HighDots Forums  

Re: window.open within innerHTML???

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: window.open within innerHTML??? in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
DU
 
Posts: n/a

Default Re: window.open within innerHTML??? - 08-05-2003 , 03:50 PM






Brian Ciarcia wrote:
Quote:
Can someone tell me if this is possible and if so, how???

I want to dynamically create a link that will use the window.open
function. This is what i tried, but i keep getting an error. ')'
expected...


function createlink(thisfirst,thislast,thisid){
var thisfirst = thisfirst
var thislast = thislast
var thisid = thisid
var thelink

thelink = '<a href=\"javascript:window.open(\'reports/reportlist.asp?ID='
Here, you would need to remove the "javascript:" pseudo-protocol.

Quote:
+ thisid + '&Fname=' + thisfirst + '&Lname=' + thislast +
Here, you would need to change the ampersand occurences into &amp;

Quote:
'\',\'reports\',\'scrollbars=yes,resizable=yes,wid th=500,height=500\')\"
Create forms for ' + thisfirst + ' ' + thislast +'</a>' ;


document.all.crreaterpt.innerHTML = thelink;

thanks in advance..
I first tried with a real dynamically created anchor and it worked
flawlessly in MSIE 6 for Windows, Mozilla 1.4final and Opera 7.20. Then
I tried with a paragraph and it worked perfectly in all 3 browsers.
Again, coding according to W3C web standards with valid HTML 4.01 strict
markup (or XHMTL 1.0) code, CSS1 properties and DOM1 attributes and
methods WORKS. No cross-browser code needed.

http://www10.brinkster.com/doctorunc...indowOpen.html

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html



Reply With Quote
  #2  
Old   
Brian Ciarcia
 
Posts: n/a

Default Re: window.open within innerHTML??? - 08-05-2003 , 04:13 PM








great.. thanks.. it looks awesome..

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.