Welcome Guest, Not a member yet? Register   Sign In
anchor tag problem
#1

[eluser]Tejas D[/eluser]
Hi.. Everyone


I am using the below anchor tag

<pre>
<a href="" name="addtocart">
</pre>


In this
$url hold the path and to that I am attaching qty value in the end

Problem is that

when first time my page(view) gets loaded and clicking that anchor tag,
It go to (may be default page) of that site.Instead of $url (in the anchor tag) of that site.

so, next I pressed back button of the browser(back to my view) and click the anchor tag again
Now it go to $url correctly.

So why this is happening.
Any error in anchor tag? or href and onclick conflicting with each other.

Please suggest on this.

Thanks in Advance

#2

[eluser]Tejas D[/eluser]
Hi.. Everyone


I am using the anchor tag with below things in that

href="" onclick="this.href=(('&lt;?=$url?&gt;'+(document.getElementById('txtQuantity').value)));" name="addtocart"

In this
$url hold the path and to that I am attaching qty value in the end

Problem is that

when first time my page(view) gets loaded and clicking that anchor tag,
It go to (may be default page) of that site.Instead of $url (in the anchor tag) of that site.

so, next I pressed back button of the browser(back to my view) and click the anchor tag again
Now it go to $url correctly.

So why this is happening.
Any error in anchor tag? or href and onclick conflicting with each other.

Please suggest on this.

Thanks in Advance
#3

[eluser]ojcarga[/eluser]
Post code.




Theme © iAndrew 2016 - Forum software by © MyBB