PDA

View Full Version : Drop Down/ Overlapping Content and asp.net



flx83
07-06-2009, 10:16 PM
1) Script Title: Drop Down/ Overlapping Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamic...lapcontent.htm (http://www.dynamicdrive.com/dynamicindex5/overlapcontent.htm)

3) Describe problem:

Hi. This script is really wonderful, but the process of "dynamically populating a Drop Down content using an external file (Ajax)" doesn't seem to work (in FF, Chrome, and IE) when the external page (located on my domain) is an ASP.net page (*.aspx), and contains a "form" tag.

I use an aspx page which contains some drop down panels. When I click on a link, the "div" gets opened, but it freezes on the ajaxloadingmsg ("Loading content. Please wait...")

I'm sure that both my page and my script are OK, because they work with any other external page (i.e html pages, or even .aspx pages without "form" tag).

Is it because I use 2 forms (the "external", loaded in the div and the "internal" loaded with my page) ?

Thank you for your help.

ddadmin
07-07-2009, 12:56 AM
The fact that the external page is an asp page and contains a form tag by themselves shouldn't cause it to not be loadable via Ajax/ this script. Please post a link to the page on your site that contains the problematic script so we can check it out.

flx83
07-08-2009, 12:01 AM
Hi.

I checked it out once more, the problem still occurs... but only with IE (7 & 8)

Click on the link below to load the page on my site :

Click here (http://www.formadep.fr/demo/edt_afficheedt_ajax.aspx)

Choose an option in the dropdownlist, and fill a checkbox (for example, semaine "38" and "L1") ; a timetable is diplayed ; click on the coloured rectangles to make the drop down panels appear.

- some links (columns 'mardi' and 'jeudi') refer to an aspx page without "form" tag with the following text "this is a classic htm page"
- some others (columns 'mercredi') refer to an another aspx page with a "form" tag, with only 2 buttons... which doesn't appear, the ajaxloadingmsg keeping displayed

(Note that I replaced the original ajaxloadingmsg: "Loading content. Please wait..." by "Chargement")

Thanks again for your help.

ddadmin
07-08-2009, 06:37 AM
Hmm I've yet to track down the issue. Are you saying when you remove the form tag from your external pages, such as this one (http://www.formadep.fr/demo/edt_modif.aspx), it successfully loads in IE? One thing you should do for all your external pages is strip them of everything except the HTML content itself, and remove the HTML/ HEAD tags etc:


<form name="_ctl0" method="post" action="edt_modif.aspx" id="_ctl0">
<input type="hidden" name="__VIEWSTATE" value="dDwtMjAwODAxNTcwNTs7Ps50ifxzU14BA2NtuJnUS9oyMysY" />


<p>
<input type="submit" name="Button1" value="D退programmer le s退minaire" id="Button1" style="font-size:8pt;" /> </p>
<p>
<input type="submit" name="Button2" value="Reprogrammer le s退minaire" id="Button2" style="font-size:8pt;" /> </p>
</form>

Even the <link href="../styles.css" rel="stylesheet" type="text/css"> tag needs to be removed, since pages fetched via Ajax will ignore it anyway. You should move this reference to the main page instead.

flx83
07-08-2009, 09:01 AM
First, yes, the simple fact to remove any asp tag and the form tag makes it loadable in IE. You can see here (http://www.formadep.fr/demo/edt_modif2.txt) the source code of the apsx page without any form tag.

Second, As you asked, I tried to delete almost everything in the page, just keeping the form and my two buttons, but the ajaxloadingmsg is back.

The problem is self referential.

- If I remove the "form" tag, the page is not dynamic anymore, because removing the FORM tag causes the page to provoke a server error (in asp.net, creating an asp tag such as a button outside a form tag is not allowed).
- If I use the form tag, the page is not diplayed in the div...

So I have the choice between diplaying a static page (therefore being unable to use the database to interact with the user), and not displaying a dynamic page ; as we say in french, the snake is bitting its tail... :confused:

And thannnnkkssss again.

ddadmin
07-09-2009, 09:44 PM
Hmm I'm not sure how the presence of a FORM tag could cause the fetching of the external page to fail. My own testing on an external page with a FORM tag works in IE7/8, so it might be something else on your page that's the culprit.

It's a long shot, but inside the .js file, try finding the below line, and adding to it the code in red:


if (window.XMLHttpRequest && !document.all) // if Mozilla, IE7, Safari etc
page_request = new XMLHttpRequest()

flx83
07-11-2009, 04:28 PM
It doesn't work.

If you think that the problem comes from the external page, you can chek it out, I put a link to the source code on my last post.

But don't worry, I'll do it in another way.

Thanks a lot for your help !! Dynamic Drive is my bible !