Hi,
I am trying to load dynamically a consolidated view of different pages. I am using prototype.js to do the ajax loading.
In one of my page there is an option button to change the option.
and this component should be embedded inside a form to work.

As I am having place div tag inside a main form and because this page is having another form, My page is not getting displayed in IE. It is working fine with FF.

Could you please let me know is there any way to do this.
I am using custom JSF components and this will not work with out <:form>

Please help me on the same. I cannot have the place holder outside mainForm.

Regards,
Balu.

Basilabraham,

You should never ever nest HTML forms for the reason I explained here.

A workaround, in your case, is to code your "option button" as a hyperlink of the form:

<a id="optionButton" href=""><img src="optionButtonImage.gif" border="0"></a>

(You could also use a <button> element, but without its own <form>)

In javascript you need to attach (using prototype's $(...) syntax) an onclick event handler to perform the AJAX request and handle its response.

This avoids the need for a separate form and should be a reasonably simple refactoring of the code you have already written.

Airshow

Basilabraham,

You should never ever nest HTML forms for the reason I explained here.

A workaround, in your case, is to code your "option button" as a hyperlink of the form:

<a id="optionButton" href=""><img src="optionButtonImage.gif" border="0"></a>

(You could also use a <button> element, but without its own <form>)

In javascript you need to attach (using prototype's $(...) syntax) an onclick event handler to perform the AJAX request and handle its response.

This avoids the need for a separate form and should be a reasonably simple refactoring of the code you have already written.

Airshow

Hi Airshow,
Thanks a lot for your reply..............
I am also using a radio button, In this can we have any work around?

Basil,

There's no great penalty in using buttons or checkboxes but are liable to being submitted with the form. This is hardly a problem as you can simply ignore certain name|value pairs server-side.

You can try not naming controls but I have a dim memory of some difference in how browsers treat unnamed controls in the submited GET/POST request. Anybody?

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.