473,748 Members | 2,502 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Function in Param Tag?

Actionscriptor needs help!

I have a working javascript function (getVar()) that extracts a variable
from a link and returns it. (tested with alert() works fine). But I am
unsure of how to right the following line.

document.write( "<param name='flashVars ' value=&{getVar( text)}>)

This is a param from an object tag (embedding flash) and i'm trying to
dynamically set the flashVars param, but this 1 line is killing me.

How do i properly right this line?

Many Thanks in advance..

Jul 23 '05 #1
5 2012
Keeko wrote:
Actionscriptor needs help!

I have a working javascript function (getVar()) that extracts a variable from a link and returns it. (tested with alert() works fine). But I am unsure of how to right the following line.

document.write( "<param name='flashVars ' value=&{getVar( text)}>)

This is a param from an object tag (embedding flash) and i'm trying to dynamically set the flashVars param, but this 1 line is killing me.

How do i properly right this line?

Many Thanks in advance..


document.write( '<param name="flashVars " value="' + getVar(text) +
'">');

Jul 23 '05 #2
Thanks Rob. It's still not working however. I'll assume based on your
example, that I can't have the function defined withing the quotes of the
write("") statement. but still not working.

Question. Do i need to have the document.write( ... withing a <script> tag???
i've tried both but it doesn't work either way. Here's some of the page.
---------------------
<script language="javas cript">
var locate = window.location // Get the link string
document.hidden Form.hiddenInpu t.value = locate // put the link string into a
hidden form.
var text = document.hidden Form.hiddenInpu t.value

function getVar(str){
theVar = str.indexOf("=" ) + 1;
return("myVar=" +str.substring( theVar));
}

</script>

<object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,29,0"
width="500" height="500">
<param name="movie" value="varTest. swf">
document.write( '<param name="flashVars " value="'+getVar (text)+'">');
<param name='menu' value='false'>"
<param name="quality" value="high">

</object>
<script language="javas cript">alert(ge tVar(text)); //Tests fine </script>
</body>
</html>
---------------------

Thanks for the help!

"RobB" <fe******@hotma il.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Keeko wrote:
Actionscriptor needs help!

I have a working javascript function (getVar()) that extracts a

variable
from a link and returns it. (tested with alert() works fine). But I

am
unsure of how to right the following line.

document.write( "<param name='flashVars ' value=&{getVar( text)}>)

This is a param from an object tag (embedding flash) and i'm trying

to
dynamically set the flashVars param, but this 1 line is killing me.

How do i properly right this line?

Many Thanks in advance..


document.write( '<param name="flashVars " value="' + getVar(text) +
'">');

Jul 23 '05 #3
I've also stumbled across this approach but again it seems to fail. any
Suggs???

<param name="flashVars " value=&{getVar( text)};>
Again, testing getVar(text) using alert(getVar(te xt)) returns correctly...

Cheers!

"RobB" <fe******@hotma il.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Keeko wrote:
Actionscriptor needs help!

I have a working javascript function (getVar()) that extracts a

variable
from a link and returns it. (tested with alert() works fine). But I

am
unsure of how to right the following line.

document.write( "<param name='flashVars ' value=&{getVar( text)}>)

This is a param from an object tag (embedding flash) and i'm trying

to
dynamically set the flashVars param, but this 1 line is killing me.

How do i properly right this line?

Many Thanks in advance..


document.write( '<param name="flashVars " value="' + getVar(text) +
'">');

Jul 23 '05 #4
Keeko wrote:
I've also stumbled across this approach but again it seems to fail. any Suggs???

<param name="flashVars " value=&{getVar( text)};>
Again, testing getVar(text) using alert(getVar(te xt)) returns correctly...
Cheers!

"RobB" <fe******@hotma il.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Keeko wrote:
Actionscriptor needs help!

I have a working javascript function (getVar()) that extracts a

variable
from a link and returns it. (tested with alert() works fine). But I
am
unsure of how to right the following line.

document.write( "<param name='flashVars ' value=&{getVar( text)}>)

This is a param from an object tag (embedding flash) and i'm
trying to
dynamically set the flashVars param, but this 1 line is killing

me.
How do i properly right this line?

Many Thanks in advance..


document.write( '<param name="flashVars " value="' + getVar(text) +
'">');


This -

&{getVar(text)} ;

....is a JavaScript entity, a Netscape invention that allows
interpolation of JS code directly into HTML, without a <script> block
and document.write. Not sure if later (mozilla) version support it, but
afaik other browsers don't, and it's rarely seen. If the above function
tests out correctly, try outputting the entire <object> dynamically.

<script type="text/javascript">

document.write(

'<object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" ' ,
'codebase="http ://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#v.. ."
' ,
'width="500" height="500">' ,
'<param name="movie" value="varTest. swf">' ,
'<param name="flashVars " value="' + getVar(text) + '">' ,
'<param name="menu" value="false">' ,
'<param name="quality" value="high">' ,
'</object>'

);

</script>

Note that document.write takes multiple arguments, comma-separated as
usual. And, yes - it needs to be within a <script> block (hey, it's
script!).

Jul 23 '05 #5
Enitre Object dynaically worked perfectly... Thanks!

"RobB" <fe******@hotma il.com> wrote in message
news:11******** **************@ l41g2000cwc.goo glegroups.com.. .
Keeko wrote:
I've also stumbled across this approach but again it seems to fail.

any
Suggs???

<param name="flashVars " value=&{getVar( text)};>
Again, testing getVar(text) using alert(getVar(te xt)) returns

correctly...

Cheers!

"RobB" <fe******@hotma il.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
> Keeko wrote:
>> Actionscriptor needs help!
>>
>> I have a working javascript function (getVar()) that extracts a
> variable
>> from a link and returns it. (tested with alert() works fine). But I > am
>> unsure of how to right the following line.
>>
>> document.write( "<param name='flashVars ' value=&{getVar( text)}>)
>>
>> This is a param from an object tag (embedding flash) and i'm trying > to
>> dynamically set the flashVars param, but this 1 line is killing me. >>
>> How do i properly right this line?
>>
>> Many Thanks in advance..
>
> document.write( '<param name="flashVars " value="' + getVar(text) +
> '">');
>


This -

&{getVar(text)} ;

...is a JavaScript entity, a Netscape invention that allows
interpolation of JS code directly into HTML, without a <script> block
and document.write. Not sure if later (mozilla) version support it, but
afaik other browsers don't, and it's rarely seen. If the above function
tests out correctly, try outputting the entire <object> dynamically.

<script type="text/javascript">

document.write(

'<object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" ' ,
'codebase="http ://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#v.. ."
' ,
'width="500" height="500">' ,
'<param name="movie" value="varTest. swf">' ,
'<param name="flashVars " value="' + getVar(text) + '">' ,
'<param name="menu" value="false">' ,
'<param name="quality" value="high">' ,
'</object>'

);

</script>

Note that document.write takes multiple arguments, comma-separated as
usual. And, yes - it needs to be within a <script> block (hey, it's
script!).

Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
3491
by: Albert | last post by:
Hi, I need to pass a pointer-to-member-function as a parameter to a function which takes pointer-to-function as an argument. Is there any way to do it besides overloading the function? Here is a small program I wrote to check if I could get the address of the function from the member-function-pointer, so that I could pass it to the function as a normal function-pointer.
3
2842
by: Chris | last post by:
function Main(param) { alert("test "+param); <<<<<<<<<<< Ici tout se passe bien : le contenu de param est bien affiché fchaine='' .... +'<div ><a href="#" onclick="javascript:return Suite('+param+');"><IMG src="tg.gif" ></a></div>' .... document.write(fchaine); }
7
2447
by: Chris | last post by:
<< Translation in english of my main post >> Hi, I do not success to pass by parameter the contents of "param". in the function "Main" if I replace Suite('+param+') by Suite('+40+') dans la fonction Main si je remplace Suite('+param+') par Suite('+40+') then all is ok. For info, the parameter "param" will be a string Thanks for your help
2
7677
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would like mine to run immediately after it. So in the code below, what JS would i need to add to my "myfile.inc" page so that I could guarantee this behavior? <!-- main page --> <html> <head> <script type="text/javascript">
23
7818
by: bluejack | last post by:
Ahoy... before I go off scouring particular platforms for specialized answers, I thought I would see if there is a portable C answer to this question: I want a function pointer that, when called, can be a genuine no-op. Consider: typedef int(*polymorphic_func)(int param);
4
154845
by: _Mario.lat | last post by:
Hallo, I have a little question: In the function session_set_save_handler I can pass the name of function which deal with session. In Xoops code I see the use of this function like that: session_set_save_handler(array(&$sess_handler, 'open'), array(&$sess_handler, 'close'), array(&$sess_handler, 'read'), array(&$sess_handler, 'write'), array(&$sess_handler, 'destroy'), array(&$sess_handler, 'gc'));
0
3494
by: bog39 | last post by:
We have z/os and DB/2 V. 8 running. I try to create a new UDF using the command CREATE FUNCTION: CREATE FUNCTION CNGETADR (INTEGER) RETURNS CHAR(50) EXTERNAL NAME CNADR001 PARAMETER STYLE DB2SQL WLM ENVIRONMENT WLMENV LANGUAGE COBOL DETERMINISTIC NO SQL NO DBINFO
3
1343
by: David | last post by:
Hi, This is causing me a few problems as I am not sure how to handle this... I have a data access layer. My layer is built in such a way that I can use any database type I choose, such as SQL Server, MySQL etc. Now, in my layer, I have all my SQL statements and use parameterised queries. An example of a parameter is...
1
1934
by: coppersaucepipe | last post by:
<xsl:call-template name="Blanks"> <xsl:with-param name="NumPop" select="$NoOfBloggs"/> <xsl:with-param name="Required" select="10"/> <xsl:with-param name="FileName" select="'fred.xml'"/> <xsl:with-param name="BlankTags" select="'/Fred/Bloggs'"/> </xsl:call-template> <xsl:template name="Blanks"> <xsl:param name="NumPop"/> <xsl:param name="Required"/> <xsl:param name="FileName"/>
0
8987
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9534
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9241
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8239
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2777
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2211
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.