Ajax DataGrid Support Product Page

Answered

go to url opens same site

Asked 25 Oct 2012 22:03:17
1
has this question
25 Oct 2012 22:03:17 Pete Manning posted:
Hi,

I have a datagrid setup with a open url behavior. the idea being that the URl opened is based on the record id - the problem is that this always opens the same site (for the first record) and not based on the selected record.

I am sure I should pass in the url of the website (part of the record) but cannot figure out how to do it.

Example: www.theclassicalbumshow.com
Click on "Tour" - and then choose one of the website icons - the same site opens each time.

ideally I would like this to open as either a seperate browser or in a lightbox but both options have the same issue.

How can I set this to open based on the user selection?
Thanks for a quick answer

Pete

Replies

Replied 26 Oct 2012 08:14:38
26 Oct 2012 08:14:38 Teodor Kuduschiev replied:
Hello Pete,

The Go To URL behavior is a behavior in Dremaweaver and it is not a part of any extension. Unfortunately this cannot be changed.
Replied 26 Oct 2012 08:23:25
26 Oct 2012 08:23:25 Pete Manning replied:
Hi Teo,

How would I do this within a lightbox then? - can I pass in the id as a parameter ?

I see plenty of forum posts on this site on the subject but they seem to be outdated as they are now formatted as HTML and unreadable.

Really would appreciate any tips as I am using the datagrid to configure the behavior.

Thanks

Pete


Replied 26 Oct 2012 09:10:05
26 Oct 2012 09:10:05 Teodor Kuduschiev replied:
You can pass an id using a number between { }

So if your ID column is the first one you pass it like:

your-url.php?yourIDparameter={0}

if your ID column is the second one you pass it like:

your-url.php?yourIDparameter={1}

etc..
Replied 26 Oct 2012 09:13:50
26 Oct 2012 09:13:50 Pete Manning replied:
Thanks Teo,

I know about how to use the parameter having done so succesfully with the maps - but this does not work with a URL.

What do you mean by your-url.php - if this is entered then the result would be www.theclassicalbumshow.com/http://link which is clearly not what is required.

Sorry to be a pain but I would like to understand how this would work with the lightbox, as everything I have tried does not work (I even managed to get a javascript error).

Thanks

Pete
Replied 26 Oct 2012 09:24:59
26 Oct 2012 09:24:59 Teodor Kuduschiev replied:
Sorry i did not understand you right.

You only need to enter the column number in {} for link as on the screenshot:
Replied 26 Oct 2012 09:32:38
26 Oct 2012 09:32:38 Pete Manning replied:
Ah! - I see but what if I want this to be dynamic based on what is selected in the datagrid?

How would I pass this as a dynamic parameter?
Could I use {show_id} for example?

Thanks

Pete
Replied 26 Oct 2012 09:40:33
26 Oct 2012 09:40:33 Teodor Kuduschiev replied:
The example i gave you is exactly based on what is selected in the datagrid.

You need to:

1. Select the row
2. Click on CELL Behaviors
3. Select when the cell is clicked
4. Select Open DMXzone Lightbox
5. Add the {3} thing as a link
6. Click OK
Replied 26 Oct 2012 09:49:41
26 Oct 2012 09:49:41 Pete Manning replied:
Ok, I will try this later -
Can you explain what the 3 refers to?

Thanks again

Pete
Replied 26 Oct 2012 10:42:35
26 Oct 2012 10:42:35 Teodor Kuduschiev replied:
3 is an example number

if your link column is the first one you pass it like:
{0}

if your link column is the second one you pass it like:
{1}

...third one = {2} ... etc
Replied 26 Oct 2012 10:51:35
26 Oct 2012 10:51:35 Pete Manning replied:
But that is the problem - I cannot do this everytime a new record is entered into the database.

So therefore how do I pass in a parameter that I do not know the value of?

Could it be {Show_ID} - where {Show_ID} is the value of the expected parameter? - would this work?

To use the google maps in a lightbox I passed into a seperate page the value: ?=Show_ID{0} this was a URL parameter that the recordset was expecting....


Replied 26 Oct 2012 11:09:21
26 Oct 2012 11:09:21 Teodor Kuduschiev replied:
I am not sure i understand what exactly do you need to achieve? Don't you have an url for each of your records?
Replied 26 Oct 2012 11:15:36
26 Oct 2012 11:15:36 Pete Manning replied:
OK - I think I misunderstood what you meant

So what you mean is if I have a table with the fields:

ID
Website URL
image.png

And wanted to open Website URL - I would pass in {1} ?

Sorry for the confusion!
Replied 26 Oct 2012 11:21:31
26 Oct 2012 11:21:31 Teodor Kuduschiev replied:
This is exactly what you should pass, yes.
Replied 26 Oct 2012 13:51:12
26 Oct 2012 13:51:12 Pete Manning replied:
It WORKS! - thanks for your help - it would have taken me hours to work that out! - perhaps some detailed documentation on this type of thing would be useful!

Reply to this topic