Bugs item #586634, was opened at 2002-07-25 11:43
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=432066&aid=586634&group_id=42081
Category: Search
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: js error - field named target in form
Initial Comment:
Can't have a form with a field in it called target because
in the function submitForm (defer_tools.js) it blows up.
I've attached a search file that I wrote to access wotsit's
format website. Is there a way to differentiate between
the form target and a field in a form called target?
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2002-07-25 14:32
Message:
Logged In: NO
Yes I can reference it via string but the problem is that
form.target is used in submitForm (defer_tools.js) and that
blows up because form.target is already defined in the form
as a hidden field. I guess maybe the problem is javascript
because form.target is a special case defining what window
to display things in. This collides with a field named target.
Is there a way in javascript to specify the non-field form.target
in submitForm function? If so, this would fix the problem.
Otherwise it is impossible to search sites with a field name
of "target".
----------------------------------------------------------------------
Comment By: Greg Mitchell (gregmitchell)
Date: 2002-07-25 12:05
Message:
Logged In: YES
user_id=582997
Look at the imdb.xml for an example - they use a field
called "for" which is also a reserved word. The syntax to
get it to work is document.imdbf["for"].value = q;
For yours, it would be
document.wotsitsearch["target].value = q;
(I'm not sure where the args.q came from - maybe that was
your problem...)
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2002-07-25 11:46
Message:
Logged In: NO
Somehow the javascript got stripped out of the attachment:
<pre>
<search function="wotsit">
<name>WotSit's Format - Programmers File Format
Reference</name>
<description>
Search WotSit's Format - Programmers File Format
Reference<br/>
<div class="helpboxDescLabels">Examples:</div>
<table class="helpboxDescTable">
<tr><td>wotsit dbf</td></tr>
</table>
</description>
<category>Computers</category>
<link>http://www.wotsit.org/</link>
<contributor></contributor>
<form name="wotsitsearch"
target="_blank"
action="http://www.wotsit.org/search.asp"
method="post">
<input type="hidden" name="target" />
</form>
<script><![CDATA[
function wotsit(q)
{
if( nullArgs("wotsit", q) )
return false;
var args = parseArgs(q, "all");
if( q == "" )
openSearchWindow("http://www.wotsit.org/");
else if( args.switches.length == 0 )
{
document.wotsitsearch.elements[0].value = args.q;
submitForm(wotsitsearch);
}
else
{
nullArgs("wotsit","?");
}
}
]]></script>
</search>
</pre>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=432066&aid=586634&group_id=42081
-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing
real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim
_______________________________________________
DQSD-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dqsd-devel