PDA

View Full Version : Possible problem in firefox with 'Dynamic Ajax Content' using non-unique filenames



led_belly
07-21-2006, 07:42 PM
1) Script Title: Dynamic Ajax Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

3) Describe problem:

I am finding that when using this code in Firefox (v1.5.0.4) to create a select box with options whose values all point to the same file (with only the query string being different) that the content loads 'stacked'. i.e.: each new page load keeps the previous page loaded, pushing down the previous page content. The desired effect is, of course, to 'overwrite' the previous page load so that only the most recent selection is visible.

I don't find that I have this problem in Safari (the only other browser I've tested it in). Here is some of my code that may help clarify what I mean:

The select box and content div (ga_merchants_info):


<form action="/dev/trunk/pub/gotapex/admin/ga_merchants.php" method="post" name="ga_merchants_form" id="ga_merchants_form">
<div>
<table border="0">

<tr>
<td align="right" valign="top"><b></b></td>
<td valign="top" align="left"><select size="20" id="ga_merchants_select" onchange="javascript:ajaxcombo('ga_merchants_select', 'ga_merchants_info')" name="ga_merchants_select">

<option value="ga_merchants.php?op=info&amp;id=1">00Inkjets.com</option>
<option value="ga_merchants.php?op=info&amp;id=2">1 & 1</option>
<option value="ga_merchants.php?op=info&amp;id=3">1-800-Contacts.com</option>
<option value="ga_merchants.php?op=info&amp;id=4">1-800-Florals.com</option>
<option value="ga_merchants.php?op=info&amp;id=5">1-800-Flowers.com</option>
<option value="ga_merchants.php?op=info&amp;id=6">1-800-Patches.com</option>

<option value="ga_merchants.php?op=info&amp;id=7">1-800-PetMeds.com</option>
<option value="ga_merchants.php?op=info&amp;id=8">1-800-Wheelchair.com</option>

....

<div id="ga_merchants_info"></div>



You'll notice I'm using onChange for the select box instead of a submit button but I doubt that this is responsible for the problem, although I have not tested it with a button.

Any ideas?

jscheuer1
07-22-2006, 06:31 AM
This is very non-standard looking:


ga_merchants.php?op=info&amp;id=1

I'd try fixing that and similar first, that may take care of it. For example, it should look like so:


ga_merchants.php?op=info&id=1

Additionally, it is not clear to me if the part where it says:

id=1

refers to an element's id or not. If by chance it does, use a letter as the first character for all id attributes of elements. Numbers are not allowed as the first character of an element's id.

If the above suggestions don't help, at least try it with the submit button, as a test.

There could be other problems and the best way to diagnose what those might be would be to have a link to your live page.