Hi,
I'm new to Alpha 5 and I'm having a hell of a time figuring out the basics. I have tried searching here, the wiki, and Google but have not found the answer I'm looking for. If this has been addressed elsewhere, please forgive me... and please share a link :)
My problem:
Super basic! I have 2 pages. Page 1 is list of links which, when clicked, should pass a variable to the URL. Page 2 will then display the details specific to the link that was clicked on page 1. I have page 2 working perfectly and if I manually type the desired variable and value in the URL, I get the appropriate results. I just can't get the links on page 1 to properly pass the variable.
Here's what I've tried:
1)
2)
Clearly, my attempts are off track. Can anyone please help point me in the right direction?
Many thanks!
I'm new to Alpha 5 and I'm having a hell of a time figuring out the basics. I have tried searching here, the wiki, and Google but have not found the answer I'm looking for. If this has been addressed elsewhere, please forgive me... and please share a link :)
My problem:
Super basic! I have 2 pages. Page 1 is list of links which, when clicked, should pass a variable to the URL. Page 2 will then display the details specific to the link that was clicked on page 1. I have page 2 working perfectly and if I manually type the desired variable and value in the URL, I get the appropriate results. I just can't get the links on page 1 to properly pass the variable.
Here's what I've tried:
1)
Page 1 has a very basic grid: a name, a number, and description.
Based on a button tutorial that I found, I tried making the name field a Link control type, then added an open web page action to the onclick Javascript. I selected the desired page within my current project and added a variable with value equal to the number field. The "complete URL" field shows exactly what I want:
link_builder_ss.jpg
However, when I put the component in my A5W page and publish the site, each link is just pointing to http://localhost/name1, http://localhost/name2, etc. instead of the URL that shows in the Javascript action.
What am I missing here?
Based on a button tutorial that I found, I tried making the name field a Link control type, then added an open web page action to the onclick Javascript. I selected the desired page within my current project and added a variable with value equal to the number field. The "complete URL" field shows exactly what I want:
link_builder_ss.jpg
However, when I put the component in my A5W page and publish the site, each link is just pointing to http://localhost/name1, http://localhost/name2, etc. instead of the URL that shows in the Javascript action.
What am I missing here?
2)
Since I happen to be working with a freeform layout, I also tried putting the anchor in the freeform template for the name field:
The result is that my names now link to: http://localhost/test_html2.a5w?test_var=<span id="TEST_COMPONENT.V.R1.COL2_NUM">123</span>
This is closer as I am getting the desired value in the URL but unfortunately it's wrapped in span tags. Try as I might, I have not been able to find a way to remove those tags.
Code:
<p>Name: <a href='test_html2.a5w?test_var={col2_num}'>{col1_name}</a></p>
This is closer as I am getting the desired value in the URL but unfortunately it's wrapped in span tags. Try as I might, I have not been able to find a way to remove those tags.
Clearly, my attempts are off track. Can anyone please help point me in the right direction?
Many thanks!
Comment