This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes problem with < script  > tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "problem with &lt script  &gt tag" Watch "problem with &lt script  &gt tag" New topic

problem with &lt script &gt tag

rachana ravali
Ranch Hand

Joined: Jun 20, 2006
Posts: 32
i am trying to print the first column of the table using the following condition:
If the javascript is enabled it should be displayed as link and if it is disabled

then it should appear as readable only text.

But when i am tring to write a hyperlink inside the <script> tag ,the datalink is not

getting displayed in that column,when the javascript is enabled.
<a href="javascript opUp('a window opens')"><nested:write property="serialId" /></a></td></script>
<noscript><nested:write property="serialId" /></noscript>

When it is disabled it is going into <noscript> and the data is displayed.
Can any one please suggest me the right way of doing it ?
thanks in advance
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
You have an extra td in your code

You would want to use document.write

<script>document.write("<a href='#'>foo</a></script>

rachana ravali
Ranch Hand

Joined: Jun 20, 2006
Posts: 32
Thanks Eric.
I agree. Here's the link:
subject: problem with &lt script &gt tag
Similar Threads
Need help selected text fields visible for particular option from drop down list in JSP(struts)
Post date is not shown
validation problem
To test if java script is enabled in client browser or not
Checking browser version & JavaScript enabled