Hi,
I want to run javascript code on href and it is not working.
Any idea?
Following is the example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>href javascript</title>
</head>
<body>
<div>
<form name="frmTest" />
<p>
<a href="http://www.google.com?id=javascript:{document.getElementById('DragPanel').value;}" target="_blank">Click</a>
</p>
<p>
<a href="http://www.google.com?id={document.getElementById('DragPanel').value;}" target="_blank">Click</a>
</p>
<p>
<a href="http://www.google.com?id=document.getElementById('DragPanel').value;" target="_blank">Click</a>
</p>
<p>
<a href="http://www.google.com?id=document.frmTest.DragPanel.value" target="_blank">Click</a>
</p>
<p>
<input type="text" name="DragPanel" id="DragPanel" value="123" />
</p>
</div>
</form>
</body>
</html>
-Thanks
Zohaib.