Jump to content
  • 0

How To Assign Parameter Values In Page Html (Not Url String)?


kparisella

Question

HI,

 

I have a pre-defined search and report datapage on a page that shows bus schedules.   The datapage needs to caspio parameters in order to show results:  [@From] and [@To]

 

For my normal search (where people select cities from drop-down menus), these parameters get passed the the URL string, and that works great.

 

However, I have about 100 webpages that are each dedicated to one popular route.   For example, Washington to Philadelphia.

 

In this imaginary example, the page would be called www.mysite.com/bus-washington-philadelphia.htm

 

This page includes the deployment code for the same pre-defined search datapage as above, so it needs the From and To parameters.

 

Since people will arrive at this page through Google (which is the whole idea), there will be no query string to get the parameters for.

 

However, since each webpage is for only 1 popular route, I can insert some code into the webpage itself (either html or javascript), before the deploy code, and assign the right values to the To and From parameters.   I just can't figure out how to do it.

 

Basically the page html will look something like this ...

 

<html>

<head>

</head>

<body>

(some code to assign "Washington" to the caspio paramter [@From] and "Philadelphia" to the caspio paremeter [@To])

 

more code

 

(deploy code for pre-defined search and report datapage, that looks up the schedules from Washington to Philadephia, using those 2 paremters)

 

</body>

<html>

 

The things to remember are that:

1.  I have no way to pass the parameters in the url query string because there isn't one.

2.  I'm using the same datapage on all 100 or so popular routes pages, so I can't assign the To and From variabls inside the datapage code.  Has to be in the html/javascript of each particular page.

 

Basically I just need a snippet of code that I can put into my webpage, before the deploy code, that assigns values to caspio parameters, which might be the same as saying that the code needs to create those variables ...

 

[@From] = "Washington"

[@To]= "Philadelphia"

 

Like that, except in a way that actually works.  Like I said, it could be html or javascript.  Or, I could just create javascript variables, if the predefined search and report page could retrieve those to use as the origin and destination of each route (rather than retrieving Caspio parameters).

 

Thanks... just haven't beeen able to figure this out.

 

 

 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello kparisella,

 

If I understand correctly, you have a pre-defined search and report datapage that should display only one record, that can be found by Search criteria, for example,

From = Washington

To = Philadelphia

 

If yes, I think, you can use Default Value.

On the Configure Filtering Fields step, open the Advanced tab and check Receive value or parameter check box.

You can select Default Value and enter your text, e.g., Washington.

 

Does it work for you?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...