JavaScript Error on page

If you are having a problem using Dragnet, post a message here.

Moderator: SourceGear

Locked
Jadams
Posts: 19
Joined: Thu Jun 08, 2006 6:21 am
Location: Glasgow, Scotland.
Contact:

JavaScript Error on page

Post by Jadams » Tue Sep 05, 2006 5:54 am

Getting an error when I type a defect number into the search box and hit enter.

It looks like a JavaScript error - noone has messed with the code so I don't understand why this is no longer working. we had to restart our IIS (I believe) but I fail to see how this could be the problem.

I have attached a screendump of the Error
Attachments
JSError.JPG
JS Error
JSError.JPG (92.11 KiB) Viewed 32103 times

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Tue Sep 05, 2006 8:56 am

It sounds like you're working fine now, right?

You can feel free to send me a log file for Dragnet: http://support.sourcegear.com/viewtopic.php?t=3523

And an IIS log might be good too. I just need around the general time of the error such as an hour before and an hour after. If you don't wish to post here or send to the private message in the forum, then just send an email to beth at sourcegear.com and reference back to this post.

Thanks

Jadams
Posts: 19
Joined: Thu Jun 08, 2006 6:21 am
Location: Glasgow, Scotland.
Contact:

Post by Jadams » Wed Sep 06, 2006 1:07 am

No the error still occurs.

It only occurs when we type a defect number into the text box and press enter, using the Goto Item button works fine. At a glance I'd say that the reference to the textbox is wrong

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Sep 06, 2006 8:59 am

We could use additional information.

What version of Dragnet are you using?

What version of the .NET Framework is Dragnet using?

What version of IE are you using when you encounter the error?
Linda Bauer
SourceGear
Technical Support Manager

Jadams
Posts: 19
Joined: Thu Jun 08, 2006 6:21 am
Location: Glasgow, Scotland.
Contact:

Post by Jadams » Thu Sep 07, 2006 4:55 am

IIS V6.0
ASP V2.0.50727

There are no errors shown in either the dragnet or the IIS log file.

The error is only a Javascript Error, so this would not show on the logs (I don't think anyway)

One thing we have found odd is this:

Notice below that the input name is set as ProjectNavBar1$GoToControl1$txtGoto

But in the JS function below it, the name is ProjectNavBar1:GoToControl1:txtGoto

one has '$' one has ':'

is this an issue?

Code: Select all

<table cellpadding="0" cellspacing="0">
 <tr valign="top">
  <td valign="top">
   <input name="ProjectNavBar1$GoToControl1$txtGoto" type="text" value="345" size="15" id="ProjectNavBar1_GoToControl1_txtGoto" class="searchinput" onFocus="document.hasFocus=this" onBlur="document.hasFocus=null" style="width:150px;" /></td>
  <td valign="top"><label for="ProjectNavBar1_GoToControl1_txtGoto" accesskey="g" class="searchlabel">
    <a id="ProjectNavBar1_GoToControl1_btnGoto" accesskey="g" class="search_a" name="btnGoto" href="javascript:__doPostBack('ProjectNavBar1$GoToControl1$btnGoto','')">Goto Item</a></label></td>
 </tr>
</table>


function checkValue(evt)
{
  var theButtonPressed;
  if (window.event.srcElement.type != "textarea") 
  {    theButtonPressed = window.event.keyCode;
    if (theButtonPressed == 13) 
    {
      event.cancelBubble = true; 
      event.returnValue = false; 
      if(document.hasFocus.name == "ProjectNavBar1:GoToControl1:txtGoto") 
       { 
        document.getElementById("btnGoto").click(); 
      }
       else 
      {
         document.getElementById("").click(); 
     }
    } 
   }
 } 

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Thu Sep 07, 2006 8:45 am

The 2.0 framework changed how controls are named. What version of Dragnet are you using? This issue was fixed in version 1.0.6 of Dragnet. If you are using a version prior to 1.0.6, you should upgrade (the current version of Dragnet is 1.0.7, the upgrade is free).

You can download the latest version of Dragnet from the following URL:
http://www.sourcegear.com/dragnet/downloads.html
Mary Jo Skrobul
SourceGear

Locked