JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old January 22nd, 2003, 12:18 PM
meth meth is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 8 meth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
tferring textfield value from parent to child

hi guys

I've exhausted my usual mates with this problem, so I've arrived at ur doorstep in search of some answers.

The purpose of this script is the same as a 'preview post' we get in forums. Users add text to a textarea then format it using schmick buttons to insert tags.

The function I'm using to set up the preview pop-up is:

Quote:
function launch(newURL, newName, newFeatures, orgName) {
var remote = open(newURL, newName, newFeatures);
if (remote.opener == null)
remote.opener = window;
remote.opener.name = orgName;
return remote;
}

function launchPreview() {
window.open("reply_preview_pop.asp", "PreviewContent", "height=400,width=600,yada yada yada,"contribText");
}


This function is called by the preview button and the preview window opens up fine.

However the problem lies with my being able to insert the text from the parent textfield into some span tags of the child.

I've tried far too many various functions, none seem to work and I'm not sure if Im targeting the opener's textfield ID correctly either.

The POS script in the child window looks like this atm..

Quote:
function display(NewCode) {
document.insertHere.value+=NewCode
}
function tfer() {
AddTxt=window.opener.postContent.Content.value
display(AddTxt)
}
function start() {
window.focus()
tfer()
}


and it called by onLoad="start()" in the head tags.

I've ID'd some span tags further down the child page as "insertHere" :-|

The site's using asp/javascript and I wont use cookies to solve this problem, nor session variables. Im sure the idea behind this script is sound, I just dont know the syntax.

p.s. innerHTML is out since it IE specific, I'd prefer a cross browser solution...

thx in advance guys.

Reply With Quote
  #2  
Old January 24th, 2003, 12:45 AM
Nigorr Nigorr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Brisbane, Australia
Posts: 78 Nigorr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Interesting, thanks for indirectly pointing me to this
Web Page Here

So there is a whole world of DOM I didn't know about. I think you will be able to get some ideas out of the above web page.

good luck

Reply With Quote
  #3  
Old January 24th, 2003, 01:49 AM
meth meth is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 8 meth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
innerHTML and outerHTML are more reliable in IE I have varied results in netscape mozilla and others.

I find it a solution only when designing for intranets run on IE.

Still haven't found a solution yet. It's a simple preview of a gad damn text field !!

oh well - perhaps I need to escape the chars b4 their tferred to child window then unescaped....

Last edited by meth : January 24th, 2003 at 01:51 AM.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > tferring textfield value from parent to child


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway