Bugs item #586634, was opened at 2002-07-25 13:43
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=432066&aid=586634&group_id=42081

Category: Search
Group: None
>Status: Pending
Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Glenn Carr (glenncarr)
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: Glenn Carr (glenncarr)
Date: 2002-07-26 11:52

Message:
Logged In: YES 
user_id=18127

cool... I've changed this in CVS... those that are using 5.5, let 
me know if this works.

----------------------------------------------------------------------

Comment By: Glenn Carr (glenncarr)
Date: 2002-07-26 10:28

Message:
Logged In: YES 
user_id=18127

cool... I've changed this in CVS... those that are using 5.5, let 
me know if this works.

----------------------------------------------------------------------

Comment By: Greg Mitchell (gregmitchell)
Date: 2002-07-26 09:29

Message:
Logged In: YES 
user_id=582997

in IE 5.5 form.attributes["target"].nodeValue works - I
don't have IE 6 to test on :)

----------------------------------------------------------------------

Comment By: Glenn Carr (glenncarr)
Date: 2002-07-25 22:11

Message:
Logged In: YES 
user_id=18127

6.0.  Unfortunately, I don't have access to 5.5 on any 
systems.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2002-07-25 22:05

Message:
Logged In: NO 

Actually that fix by specifying attributes seems NOT to work 
for me.  I'm using IE 5.5 and it's having a problem trying to set 
the value (ie: form.attributes["target"].value = '_blank')

What version did you test it on?

----------------------------------------------------------------------

Comment By: Glenn Carr (glenncarr)
Date: 2002-07-25 19:04

Message:
Logged In: YES 
user_id=18127

I've changed in a fix to defer_tools.js for this.  In 'submitForm' 
I changed form.target to form.attributes["target"].value.  It 
seems to work now with the wotsit.xml search.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2002-07-25 16: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 14: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 13: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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DQSD-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dqsd-devel

Reply via email to