Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 5th, 2007, 01:32 PM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default Response.Write doesn't work?

This javascript code in the html below does nothing and provides no error message for why it isn't working:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
        <meta content="JavaScript" name="vs_defaultClientScript">
    <body id="bdySurvey" MS_POSITIONING="FlowLayout" style="color:;font-family:Arial;font-size:10pt;">
        <form name="frmSurvey" id="frmSurvey">
My text before the script<br/>

<script language="javascript">Response.Write("TEST TEXT");</script><br/>

my text after the script

If I replace the Response.Write with alert, I get a message box, so I know it's running the script. But I cannot seem to get any text to appear on my form. What am I doing wrong?
Reply With Quote
  #2 (permalink)  
Old March 27th, 2007, 02:03 AM
Friend of Wrox
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post


There is no Response object in java script, if you try it in IE [java script validation enabled]you might get a script error.

You can use jsp scriplets [<%%>] or assignment tag [<%=%>] and use out object and call print() method to out put string. if you want to use only script the use innerHTML attribute to set the text.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Response.Write won't work? Ron Howerton JSP Basics 1 March 23rd, 2007 07:39 AM
response.write(hyperlink) adolphus ASP.NET 1.0 and 1.1 Basics 7 September 11th, 2006 03:05 AM
response.write crmpicco Classic ASP Basics 1 January 27th, 2005 06:31 PM
response.write netcrawler Classic ASP Databases 4 September 29th, 2004 10:13 AM
Response.write Sach Classic ASP Components 5 March 19th, 2004 06:40 AM

All times are GMT -4. The time now is 04:32 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.