Page 1 of 1

1 line of code too

Posted: Mon Sep 20, 2010 2:46 pm
by emelianenko
Hello

as table rows dynamically generated need in my case to contain a link, they also have to pass a value to another page, but specifically inside a tab in that page.

this static link does take me to the inside of the tab, but of course it sends no value.

Code: Select all

<a href="detailpageswithlinks.htm#tabs-2" id="my-text-link">MytextLink</a>
and this is somewhat a dynamically generated link but still does not work

Code: Select all

echo "<td>" . "<a href='" . "linkTothePage" . "'>".htmlspecialchars($daten['provider']). "</a>" . "</td>";
this below takes me to the page, but not to the tab I want, only to the first one and does not pass the value, but somehow it is closer.

Code: Select all

echo "<a href=detailpages1.php?#tabs-1$row[product_id]>Product Details</a>"; 
so, somehow I need to combine those lines to make 1 line right.

I would appreciate a lot if someone knew how to write that one line.

thanks a lot

Re: 1 line of code too

Posted: Mon Sep 20, 2010 4:18 pm
by McInfo
This URI will submit variables "a", "b", and "c" with values "1", "2", and "3", respectively, to a page named "page.php" and scroll to the first HTML element that has an id attribute with a value of "d".

Code: Select all

page.php?a=1&b=2&c=3#d

Re: 1 line of code too

Posted: Mon Sep 20, 2010 4:53 pm
by emelianenko
McInfo wrote:This URI will submit variables "a", "b", and "c" with values "1", "2", and "3", respectively, to a page named "page.php" and scroll to the first HTML element that has an id attribute with a value of "d".

Code: Select all

page.php?a=1&b=2&c=3#d


Hello ! thank you again!


that was good!, so the # sign that I even had in my first line scurries down the page to find its spot, and what I was missing is the pair of variables and values. I had read about those pairs but the spot inside a tab confused me, now it is clear the concept.

and thanks again for the other line the other day, it really solved the whole page and my day, otherwise i d probably still be at it.

best regards

=====================================================================================================================

Re: 1 line of code too

Posted: Mon Sep 20, 2010 7:36 pm
by McInfo
:)