Author Topic: HTML/Javasript Question  (Read 601 times)

0 Members and 1 Guest are viewing this topic.

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
HTML/Javasript Question
Hey guys,

I have a HTML/JavaScript question.  It's been boggling my brain for some time (I can see clearly now my brain is gone) now and can't seem to find the answer - anywhere.

I have a page called - say - "index.html".  I have another page called "popup.html".  There's a

Code: [Select]

iframe src="about.blank" id="nom"


tag in "popup.html".  I have a link in "index.html" that upon click, it will load a popup window with "popup.html".  The file specified in the

Code: [Select]

href="filename.fil"


I want loaded in the "iframe" in the popup.  I'm pretty sure this involves a JScript, but how the heck can I approach this enigma?

Cheers,

Rampage

 

Offline an0n

  • Banned again
  • 211
  • Emo Hunter
    • http://nodewar.penguinbomb.com/forum
HTML/Javasript Question
I'm tired and your grammar is ****ing appaling, so this is probably wrong, but: Give the Iframe a "name=" and give the link a "target=" with the same value.
"I.....don't.....CARE!!!!!" ---- an0n
"an0n's right. He's crazy, an asshole, not to be trusted, rarely to be taken seriously, and never to be allowed near your mother. But, he's got a knack for being right. In the worst possible way he can find." ---- Yuppygoat
~-=~!@!~=-~ : Nodewar.com

 

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
HTML/Javasript Question
An0n, that would work if the "iframe" were on the same page as the link.  But I actually want a popup window load a pre-made HTML file with the "iframe" tag and the linked file to load in that "iframe".

My grammar is appalling.  Is that a compliment? ;)

 

Offline an0n

  • Banned again
  • 211
  • Emo Hunter
    • http://nodewar.penguinbomb.com/forum
HTML/Javasript Question
Why, in the name of all that looks like it came from a Spawn comic, would you want to have the iframe anyway?

Oh, wait. You're making a remote thingy, ain't ya?

In that case I suggest just visiting some porn site and stealing their code.
"I.....don't.....CARE!!!!!" ---- an0n
"an0n's right. He's crazy, an asshole, not to be trusted, rarely to be taken seriously, and never to be allowed near your mother. But, he's got a knack for being right. In the worst possible way he can find." ---- Yuppygoat
~-=~!@!~=-~ : Nodewar.com

 

Offline Lonestar

  • Fred Zone Guru
  • 27
    • United Gamers Coalition
HTML/Javasript Question
If i understood that atrocious grammer, then all you need to do is put the iframe in the popup window. Put a Jscript on the index page link that produces the popup, and tell it to find your page.

Inside the page it finds, put the Iframe HTML code there and it will call to the external page and add it to iframe.

Im curious as to why you want a popup window and an iframe inside that popup window?

Wouldnt it be easier for you (if your considering editability) to use an include file inside the popup page? Saves you the iframe sizing issues and excess slider bar problems.

Again, i may be entirely off base in my response due to the grammar of the question, ive read it 6 or 7 times and im afraid i can find 6 or 7 different answers to your question, all different. LOL.

Hope this helps a bit, if you need more help direct email me at [email protected]

Ive tutored people in HTML, Javascripting, PHP, ASP, DHTML and much more, im reliable and fast so feel free to give me a shout and ill be glad to give you help first hand.

Oh and make sure to check out http://www.w3schools.com for all your basic web development questions.

 

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
HTML/Javasript Question
Code: [Select]

var popupName = "title";

function pdfviewer(pdfdoc) {
var popup = window.open("", popupName,'toolbar=0,status=0,menubar=0,scrollbars=1');

popup.location = "pdfview.html"
popup.document.frames['pdfshow'].location.href = pdfdoc;
}


Never mind!  I got it!  The code is read as above.  Thanks Lonestar and an0n, although I didn't visit any porn sites - thank God.  ;)
« Last Edit: July 09, 2004, 06:42:45 pm by 255 »

 

Offline Thorn

  • Drunk on the east coast.
  • 210
  • What is this? I don't even...
HTML/Javasript Question
Whats wrong with porn?

  

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
HTML/Javasript Question
I have the complete JScript written:

Code: [Select]

function pdfviewer(pdfdoc)
{
var popupName = "title";
var popup = window.open("../include/pdfview.html", popupName,'toolbar=0,status=0,menubar=0,scrollbars=0');

if (popup.closed)
{
popup.document.frames['pdfshow'].location.href = pdfdoc;
}
else
{
popup.window.close();
var popup = window.open("../include/pdfview.html", popupName,'toolbar=0,status=0,menubar=0,scrollbars=0');
popup.document.frames['pdfshow'].location.href = pdfdoc;
}
}


But the only problem happens to be that it would only work on my computer but not on my server.  The principle error pointed to me occurs at:

Code: [Select]

popup.document.frames['pdfshow'].location.href = pdfdoc;


It says that it's "null or not an object".  Queer, because it doesn't say that when I run the page on my computer.