View Full Version : help me where the error
bmwmpower
04-25-2003, 05:52 PM
u need help in this code what i want in this code is open in new window with some value so this is my code
s = s & "<td class='dataTD' width='30' align='center'height='15'><b><font face='Verdana' size='1'><a href='shearfol.asp?d=" & d & "&f=" & d + "\" + f1.name & + "&c=" & c & + "&f2=" & f1.name &"'><img src='imgs\shar.gif' alt='Share Folder' border='0'></a></font></b></td>"
now i change this code to
s = s & "<td class='dataTD' width='30' align='center'height='15'><input name='button' type='button' class=navbutton id='fla****' onClick='window.open('shearfol.asp?d=" & d & "&f=" & d + "\" + f1.name & + "&c=" & c & + "&f2=" & f1.name &"','mywindow','width=605,height=480')' value='share'>"
========now where the error =========
Roy Sinclair
04-25-2003, 08:28 PM
Look at your usage of quotes, you must escape the quotes properly so they carry through:
onClick='window.open(\'shearfol.asp?d=" & d & "&f=" & d + "\" + f1.name & + "&c=" & c & + "&f2=" & f1.name &"\',\'mywindow\',\'width=605,height=480\')' value='share'>"
bmwmpower
04-26-2003, 09:40 PM
this change still not work so any one help me plz
Roy Sinclair
04-28-2003, 03:51 PM
It's still a quoting problem but I was thinking in terms of javascript instead of VB, the following should work better:
s = s & "<td class=""dataTD"" width=""30"" align=""center""
height=""15""><input name=""button"" type=""button""
class=""navbutton"" id=""fla****"" onClick=""window.open
('shearfol.asp?d=" & d & "&f=" & d + "\" + f1.name & + "&c=" & c
& + "&f2=" & f1.name &"','mywindow','width=605,height=480')""
value=""share"">"
In VB to place a double quote inside a literal you need only "double" it up, two double quotes in a row inside the literal will place one double quote inside the resulting string.
bmwmpower
04-29-2003, 10:45 AM
thanks for help but i have littel problem
the problem is
in the place "&f=" & d + "\" + f1.name &
the vule of f the "/" disappear that mena the value of f = nnnmmm this is the problem
the value of f must = nnn/mmm
Roy Sinclair
04-29-2003, 02:52 PM
LOL! It looks like I wasn't the only one trying to mix Javascript and VB.:p
You used "+" characters to join the strings in VB but in VB it needs "&":
s = s & "<td class=""dataTD"" width=""30"" align=""center""
height=""15""><input name=""button"" type=""button""
class=""navbutton"" id=""fla****"" onClick=""window.open
('shearfol.asp?d=" & d & "&f=" & d & "\" & f1.name & "&c=" & c
& "&f2=" & f1.name &"','mywindow','width=605,height=480')""
value=""share"">"
hello
if you're talking JavaScript, you need to escape the backslash with another backslash.
Roy Sinclair
04-29-2003, 04:02 PM
Originally posted by ReyN
hello
if you're talking JavaScript, you need to escape the backslash with another backslash.
No, it's not javascript.
bmwmpower
04-30-2003, 12:47 PM
i still have the same error with / any one can help me plz
Roy Sinclair
04-30-2003, 04:48 PM
What does your code look like now? What error(s) are you seeing?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.