• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with &lt script &gt tag

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
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.
<td>
<script>
<a href="javascript opUp('a window opens')"><nested:write property="serialId" /></a></td></script>
<noscript><nested:write property="serialId" /></noscript>
</td>

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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have an extra td in your code

You would want to use document.write

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

Eric
 
rachana ravali
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Eric.
 
reply
    Bookmark Topic Watch Topic
  • New Topic