HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 19th, 2000, 03:50 PM
kimgokce kimgokce is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 2 kimgokce User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have fumbled blindly around in every sort of doc on and off line to locate how (if possible) to assign a js variable as the value of an applet param tag generated in a "document.write" applet script.

I have found one or two syntax options but neither has helped at all. I am tapped out and I see a couple of other similiar threads around with no resolution.

Here's my statement out of context. It is one of twenty such elements of an applet tag. All the others are static assignments that work fine and the applet tag is published and loads the applet fine.

document.write("<PARAM NAME="links3" VALUE=" + portal">");

where 'portal' is a global var in the same page assigned to the value of document.referrer. This assignment is confirmed via a document.write on the resulting html page.

I found on another forum a sample like:

document.write '<param name=MAPFILE value="' + siteMapUri + '">

but that led no where no matter how I tweaked the syntax. Any insights would be salve for my wounds. I need to support NS4x & IE4.x in this implementation. Seasons Greetings! -Kim

Reply With Quote
  #2  
Old December 20th, 2000, 12:07 PM
kimgokce kimgokce is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 2 kimgokce User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
For those who suffer from the same myopia as I did with my applet param question, here's the solution to my mistake as received from another forum ...

=========================================
Both pieces of code do have syntax errors:
correction for first is
document.write("<PARAM NAME="links3" VALUE="" + portal + "">");
note doubled double-quotes around + portal + . Reason is that " denotes quotes as part of string that we want to write to document and others denotes bounds of string literals. Note that if portal is not string variable you should (but not must - behaviour may vary) use portal.toString() construct - to be sure that operator + will be understood as string concatenation operator.
Second part of code seems to be VBScript. It's basic style - call to function without parentheses. But this example is incorrect too. In VBScript (as in any Basic) you can't use single quotes (') as string literal - single quote starts line comments in Basic.
so you should use either code above or this one (if have trouble understanding what backslash () means.
document.write('<PARAM NAME="links3" VALUE="' + portal + '">');


Michael Dubner
Brainbench MVP/HTML+JavaScript http://www.brainbench.com

==============================

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > applet param as js variable


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!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT