[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

document.write() alternative?

Posted on 1998-10-29
4
Medium Priority
?
368 Views
Last Modified: 2008-03-10
Using Javascript, I want to be able to collect multiple screens of information from user forms in cases where I don't have to go back to the host.  So I want to replace existing windows with new ones based on info from the form.  For small amounts of information, building new screens with document.write() works OK.  But, using document.write() for large amounts of info is clumsy (everything needs to be squished up on a single line)  Is there some other way to do this, or is there some way to use document.write() w/o having to squish up everything?
0
Comment
Question by:lennyh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:Grdv
ID: 1273179
well, without squishing:
var tmptext='<body bgcolor="black" text="white">'
tmptext+='<table border=1 cellspacing=0 cellpadding=0>'

//and so on... note the use of single quotes to enable double qoutes inside...

document.write(tmptext);
if that was what you meant...
another way of doing it is to use something like this:
var tmpwindow = window.open('') // **not sure about this one
tmpwindow.location=tmptext; //tmptext is the same as above...


**not sure about this one: why? well I'm not sure that's the way of opening up nothing in the current frame, but if it's a specific frame, and you know the name of it, the line should be:
var tmpwindow = window.open('','**framename**') // ** sure about this one
where **framename** represents the frames name.

hope it helped

//Grdv
0
 

Author Comment

by:lennyh
ID: 1273180
Grdv,

Thanks for your response.  Sure seems like that will work.  Still a tiny bit clumsy, but a whole lot better than what I was trying to do.

I'll take it.

Regards,

Lenny
0
 
LVL 2

Accepted Solution

by:
Grdv earned 400 total points
ID: 1273181
oops, was supposed to be posted as an answer... :)
well, the most important thing is that you got what you needed

//Grdv
0
 

Author Comment

by:lennyh
ID: 1273182
Grdv, thanks for your clear and responsive answer.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question