Jump to content


Photo

Variable Declaration / Initiation


  • Please log in to reply
3 replies to this topic

#1 aball65

aball65
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 February 2006 - 02:16 AM

Clicking the Q/PL button as defined by the following HTML:

<td>
<form>
<input class="mediumbutton" type="button" value="Q P/L"
onClick=popQIPLWindow(02132006205725) title="Query Parts and Labor">
</td>
</form>

and Javascript:

function popQIPLWindow(rcvnum)
{
var varrcvnum=parseInt(rcvnum);
url = 'http://localhost/law...pl.php?rcv_num=' + varrcvnum
window.open(url,'mywindow','left=525 width=475,height=320,resizable=yes,scrollbar=yes,location=yes');
return true;
}

results in the following screen pop 75% of the time:

[a href=\"http://localhost/lawnmower/qipl.php?rcv_num=2132006210949\" target=\"_blank\"]http://localhost/lawnmower/qipl.php?rcv_num=2132006210949[/a]


and the following screen pop 25% of the time:

[a href=\"http://localhost/lawnmower/qipl.php?rcv_num=149520190421\" target=\"_blank\"]http://localhost/lawnmower/qipl.php?rcv_num=149520190421[/a]

The following is the screen pop I need:

[a href=\"http://localhost/lawnmower/qipl.php?rcv_num=02132006210949\" target=\"_blank\"]http://localhost/lawnmower/qipl.php?rcv_num=02132006210949[/a]

Any help would be greatly appreciated - Thanks.

#2 Javizy

Javizy
  • Members
  • PipPipPip
  • Advanced Member
  • 44 posts

Posted 14 February 2006 - 02:35 AM

[!--quoteo(post=345555:date=Feb 14 2006, 02:16 AM:name=aball65)--][div class=\'quotetop\']QUOTE(aball65 @ Feb 14 2006, 02:16 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Clicking the Q/PL button as defined by the following HTML:

<td>
<form>
<input class="mediumbutton" type="button" value="Q P/L"
onClick=popQIPLWindow(02132006205725) title="Query Parts and Labor">
</td>
</form>

and Javascript:

function popQIPLWindow(rcvnum)
{
var varrcvnum=parseInt(rcvnum);
url = 'http://localhost/lawnmower/qipl.php?rcv_num=' + varrcvnum
window.open(url,'mywindow','left=525 width=475,height=320,resizable=yes,scrollbar=yes,location=yes');
return true;
}

results in the following screen pop 75% of the time:

[a href=\"http://localhost/lawnmower/qipl.php?rcv_num=2132006210949\" target=\"_blank\"]http://localhost/lawnmower/qipl.php?rcv_num=2132006210949[/a]
and the following screen pop 25% of the time:

[a href=\"http://localhost/lawnmower/qipl.php?rcv_num=149520190421\" target=\"_blank\"]http://localhost/lawnmower/qipl.php?rcv_num=149520190421[/a]

The following is the screen pop I need:

[a href=\"http://localhost/lawnmower/qipl.php?rcv_num=02132006210949\" target=\"_blank\"]http://localhost/lawnmower/qipl.php?rcv_num=02132006210949[/a]

Any help would be greatly appreciated - Thanks.
[/quote]

localhost links won't work over the web I'm afraid. Substitute your IP address in its place.

#3 miksel

miksel
  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 14 February 2006 - 08:57 PM

Change this:
<input class="mediumbutton" type="button" value="Q P/L"
onClick=popQIPLWindow(02132006205725) title="Query Parts and Labor">

to this (send a string to the onClick function):
<input class="mediumbutton" type="button" value="Q P/L"
onClick=popQIPLWindow("02132006205725") title="Query Parts and Labor">

AND change this:
function popQIPLWindow(rcvnum)
{
var varrcvnum=parseInt(rcvnum);
:
:

to this:
function popQIPLWindow(rcvnum)
{
var varrcvnum=rcvnum;
:
:


I think that would give you the right value..

/micke




#4 aball65

aball65
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 15 February 2006 - 08:52 PM

Thanks a ton!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users