Super Web Mart - Discount Coupons & Deals - Discount Promos, Coupon Codes, Discount deals and web site reviews
 

Author Topic: How to Pass HTML to POP UP window?  (Read 3359 times)

0 Members and 1 Guest are viewing this topic.

Offline onetwothree

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
How to Pass HTML to POP UP window?
« on: December 06, 2007, 09:09:34 AM »
Hi,

I am opening help messages in popup window. If a customer is login than I want to show 'Welcome Customer_name' on the top of the pop up. How can I send this data to POP UP window from parent window?

Webmaster Forum

How to Pass HTML to POP UP window?
« on: December 06, 2007, 09:09:34 AM »

Offline David

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: How to Pass HTML to POP UP window?
« Reply #1 on: December 06, 2007, 09:14:54 AM »
Code: [Select]
function popUp(){

var mywin = window.open("","wildebeast","width=350,height=350,scrollbars=1,resizable=1")

var text = document.form.input.value

var html = "<html><head></head><bodyWelcome, <b>"+ Customer +"</b>."
html += "How are you today?</body></html>"

//variable name of window must be included for all three of the following methods so that
//javascript knows not to write the string to this window, but instead to the new window

mywin.document.open()
mywin.document.write(html)
mywin.document.close()

}

Try this code. Not tested.

Offline Bramwell

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: How to Pass HTML to POP UP window?
« Reply #2 on: November 02, 2009, 11:37:03 PM »
hey....I have no knowledge about computer programing language like html, dhtml, java script etc. So I can't any comment on this post. I'm really very sorry.
newbielink:http://awardsengravingcompany.com [nonactive]

Offline disneycham

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How to Pass HTML to POP UP window?
« Reply #3 on: November 30, 2009, 01:59:58 AM »
you can the pop up.html in the code below for additional pages and copy the "pop-up.htm" and give it the name you edited the link with. Make sure the names match exactly, hosting is case sensitive.

Offline vipandiversity

  • Full Member
  • ***
  • Posts: 141
    • View Profile
    • Facebook Timeline Covers
Re: How to Pass HTML to POP UP window?
« Reply #4 on: June 18, 2012, 10:36:24 PM »
The variables newwindow, def1 and def2 are local variables, that means they are declared inside a function. You can't get those variables from another function or window that way.

What you should do it put newwindow, def1 and def2 outside of the function:
Code:

var newwindow;
var def1 = 'hi';
var def2 = 'there';

function popwindow(url, name) {
newwindow = window.open(url, name, 'height=500,width=800');
if (window.focus) { newwindow.focus(); }
}

Offline alluremedspa123

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Cosmetic Surgery
Re: How to Pass HTML to POP UP window?
« Reply #5 on: September 18, 2012, 12:53:55 AM »
You're making a "site". It's a location, not vision.

There's no pure HTML way of doing it. If your site runs Apache as its web server you can either:

1) Set up a password for a specific folder or the whole site by editing a .htaccess file - one of many places to research it here:


2) Javascript:


Anything deeper needs some coding knowledge like PHP or ASP.
newbielink:http://www.alluremedspa.in [nonactive] | newbielink:http://www.alluremedspa.in/cosmetic-surgery/breast-surgery.html [nonactive]

Offline Smitha nayak

  • Sr. Member
  • ****
  • Posts: 454
    • View Profile
Re: How to Pass HTML to POP UP window?
« Reply #6 on: June 04, 2013, 10:13:24 PM »
Hi.... Sorry i dont have much knowledge  about this..... anyways thanks for posting...

Offline melanieclark

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: How to Pass HTML to POP UP window?
« Reply #7 on: September 18, 2020, 08:37:37 AM »
problem can occur in .htaccess file

Webmaster Forum

Re: How to Pass HTML to POP UP window?
« Reply #7 on: September 18, 2020, 08:37:37 AM »