473,396 Members | 1,777 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Calling a Function with more than one parm.

I want to pass the function to string parms how do i seperate them.

<form>
<input type="button"
onClick="openTemplate('K:\pcr\764\Requirements\',' Requirement
Specification Document-DWD v1.52.doc')" value="Requirements Template">
</form>

When i only passed one string like thjis it worked.

<form>
<input type="button"
onClick="openTemplate('K:\pcr\764\Requirements\Req uirement Specification
Document-DWD v1.52.doc')" value="Requirements Template">
</form>

Jul 23 '05 #1
6 1222
rockocubs wrote:
I want to pass the function to string parms how do i seperate them.
With commas like you did.
<form>
<input type="button"
onClick="openTemplate('K:\pcr\764\Requirements\',' Requirement
Specification Document-DWD v1.52.doc')" value="Requirements Template">
</form>

When i only passed one string like thjis it worked.

<form>
<input type="button"
onClick="openTemplate('K:\pcr\764\Requirements\Req uirement Specification
Document-DWD v1.52.doc')" value="Requirements Template">
</form>


Then openTemplate is only set up to use/utilize one parameter.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #2
Here is the Function.
function openTemplate(documentPath,documentName)
{
var str1 = documentPath + documentName;
var str2 = [ "K:","Deloitte","Team1 Status report", prompt("Enter Pcr
Number",""), documentName
].join("\\");

OpenDoc1(str1,str2);
}
Jul 23 '05 #3
rockocubs wrote:
Here is the Function.
function openTemplate(documentPath,documentName)
{
var str1 = documentPath + documentName;
var str2 = [ "K:","Deloitte","Team1 Status report", prompt("Enter Pcr
Number",""), documentName
].join("\\");

OpenDoc1(str1,str2);
}


You need to escape that backslash at the end of the first argument, or
it'll mask the following (delimiter) quote and foul things up.
Something else odd going on with that function but I adjusted it & it
went away. OK by me.

function openTemplate(documentPath, documentName)
{
var str1 = documentPath + documentName;
var str2 = [
"K:" ,
"Deloitte" ,
"Team1 Status report" ,
prompt("Enter Pcr Number", "") ,
documentName
].join("\\");

OpenDoc1(str1,str2);
}

<input
type="button"
onclick="openTemplate('K:\pcr\*764\Requirements\\' ,
'Requiremen*t specification Document-DWD v1.52.doc')"
value="Requirements Template">

Jul 23 '05 #4
Is the 3D stuff suspose to be there?

Jul 23 '05 #5
rockocubs wrote:
Is the 3D stuff suspose to be there?


Ignore 3D -- it's base64 encoding used during the transfer of articles.
You shouldn't be seeing it.

Jul 23 '05 #6
rockocubs wrote:
Here is the Function.
OK, read this groups FAQ with regards to quoting what you are replying to.
function openTemplate(documentPath,documentName)
{
var str1 = documentPath + documentName;
var str2 = [ "K:","Deloitte","Team1 Status report", prompt("Enter Pcr
Number",""), documentName
].join("\\");


Here, add an alert('str1 = ' + str1 + '\nstr2 = ' + str2)

And check to see if str1 and st2 are what you think they should be.
OpenDoc1(str1,str2);
}


You call a function to create variables to call another function? And in
the middle of it all, a prompt?

Where is OpenDoc1? If openTemplate is recieving, and passing, the proper
parameters, check in OpenDoc1.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #7

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

Similar topics

3
by: P | last post by:
I would like to call my stored proc and invoke the WITH RECOMPILE option. I can't figure out what to set in ADO to make that happen. Anyone know how to make this work? BTW, I _don't_ want to...
2
by: M | last post by:
Hello I am trying to build an Oracle PL/SQL Package. Some functions should only be visible from the package, while other functions need to be called from outside. I tried the following: --...
7
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...
23
by: philipl | last post by:
hi, I have some code here which basically look for within a string, the occurance of any 3 consectative characters which are the same. so AAA bbb etc would be reported by this function. I later...
4
by: Angel | last post by:
I'm trying to call a DLL function that receives as parameter a user-defined structure created by the company that made the dll. When I call the function from my main form, I call...
6
by: Angel | last post by:
I'm exporting (with DllImport) a C-style function with this syntax: int z9indqry (4_PARM *parm); 4_PARM is a structure declared in a proprietary header file that cannot be included in my...
7
by: VMI | last post by:
Can I call a stored proc from .net with a parm that changes during the SP? For example, I call the SP with parameter sMyVariable (which changes in the SP), and when I access it after the SP is...
6
by: yamu_rhyme | last post by:
Is there any split function in DB2? How to split a field value separated with delimiter ","(comma)?
8
by: bob | last post by:
Hi, I'm working on fixing issues/bugs in a legacy codebase. I'd like to ask experts opinion on a decision I've made regarding a function. I don't have my Scott Meyers at hand but I'm fairly...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...

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.