Forums
This topic is locked
change value inside link tag
Posted 09 Feb 2007 08:08:39
1
has voted
09 Feb 2007 08:08:39 LorD ExoskeletoN posted:
hi dear experts....i have a problem on how to change value inside link tag, href in particular! please try to look at this:<pre id=code><font face=courier size=2 id=code>
<script language="JavaScript" type="text/javascript">
<!--
function css_style(css_choice) {
document.getElementById("css_style".innerHTML="css_styles/style"+css_choice+".css";
}
-->
</script>
<link href="<div id=css_style></div>" rel="stylesheet" type="text/css">
</font id=code></pre id=code>
i know it wont work but i want it this way to happen ... placing a value in the href portion of the link tag!
i know how to place a value if div tag alone...but in this case ...any idea? is this possible?
please help...TIA
<center>
afraid NOT to FAIL for you learn NOTHING
www.nasbikesphilippines.bravehost.com
<img src="www.motorcyclephilippines.com/forums/signaturepics/sigpic14460_2.gif" border=0></center>
Edited by - exoskeleton on 09 Feb 2007 09:02:05
Replies
Replied 09 Feb 2007 19:01:16
09 Feb 2007 19:01:16 Alan C replied:
I'm no good with javascript, but here's a snippet from one of my pages
<td width="12%"><a href="list_events2.php?sortBy=<?php echo $_GET['startDate']; ?>">Start date </a></td>
<td width="10%"><a href="list_events2.php?sortBy=<?php echo $_GET['cityName']; ?>">City</a></td>
the php inserts into the links fine, it makes the table headings into links that call the same file with a different query to sort the table according to the header tow - is that the kind of thing you want?
Not sure if that will show properly as the box says HTML is OFF at the left
<td width="12%"><a href="list_events2.php?sortBy=<?php echo $_GET['startDate']; ?>">Start date </a></td>
<td width="10%"><a href="list_events2.php?sortBy=<?php echo $_GET['cityName']; ?>">City</a></td>
the php inserts into the links fine, it makes the table headings into links that call the same file with a different query to sort the table according to the header tow - is that the kind of thing you want?
Not sure if that will show properly as the box says HTML is OFF at the left