Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table row link

Status
Not open for further replies.

thompom

Technical User
Joined
Dec 4, 2006
Messages
395
Location
GB
hi - am new to jscript and want a row
of a table to be a link to a new page.

have the following but get an 'invalid argument' error

Code:
<script>
function openview(url){
window.open(url,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=655,height=650');
}
</script>

<table>
<tr<%=sItemRowClass%> style='cursor: hand;' onClick="openview('stockview.asp?stockid=1');">
<td>blah</td>
</tr>
</table>

 
You're missing the second parameter to the window.open call. Try this:

Code:
window.open(url, [!]'', [/!]'scrollbars=yes,width=655,height=650');

Note: I've removed all the gubbins from the last param that you don't need to specify.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
many thanks dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top