aball65 Posted February 14, 2006 Share Posted February 14, 2006 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 Link to comment https://forums.phpfreaks.com/topic/3416-variable-declaration-initiation/ Share on other sites More sharing options...
Javizy Posted February 14, 2006 Share Posted February 14, 2006 [!--quoteo(post=345555:date=Feb 14 2006, 02:16 AM:name=aball65)--][div class=\'quotetop\']QUOTE(aball65 @ Feb 14 2006, 02:16 AM) [snapback]345555[/snapback][/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. Quote Link to comment https://forums.phpfreaks.com/topic/3416-variable-declaration-initiation/#findComment-11678 Share on other sites More sharing options...
miksel Posted February 14, 2006 Share Posted February 14, 2006 [b]Change this:[/b]<input class="mediumbutton" type="button" value="Q P/L"onClick=popQIPLWindow(02132006205725) title="Query Parts and Labor">[b]to this [/b](send a string to the onClick function):<input class="mediumbutton" type="button" value="Q P/L"onClick=popQIPLWindow("02132006205725") title="Query Parts and Labor">[b]AND change this:[/b]function popQIPLWindow(rcvnum) {var varrcvnum=parseInt(rcvnum);::[b]to this:[/b]function popQIPLWindow(rcvnum) {var varrcvnum=rcvnum;::I think that would give you the right value../micke Quote Link to comment https://forums.phpfreaks.com/topic/3416-variable-declaration-initiation/#findComment-11730 Share on other sites More sharing options...
aball65 Posted February 15, 2006 Author Share Posted February 15, 2006 Thanks a ton! Quote Link to comment https://forums.phpfreaks.com/topic/3416-variable-declaration-initiation/#findComment-11800 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.