[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

what is wrong with this tag?

Posted on 2008-01-31
5
Medium Priority
?
207 Views
Last Modified: 2013-11-19
Hello,

I'm using follwoing tag but it is not working. What is wrong?!


<input style="margin-left:5px;" type="button" onclick="javascript:history.go(-1);" value="Back" class="inputsubmit" />      

Thanks.
0
Comment
Question by:akohan
  • 3
  • 2
5 Comments
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20793464
akohan,

Try ...

<input style="margin-left:5px;" type="button" onclick="window.location.history.go(-1);" value="Back" class="inputsubmit" />

... if that doesn't work then ...

<input style="margin-left:5px;" type="button" onclick="window.location.history.back();" value="Back" class="inputsubmit" />

Let me know if you have any questions or need more information.

b0lsc0tt
0
 

Author Comment

by:akohan
ID: 20793543


Hi,

Thanks for your response. Unfortunatley, none of them works since I'm using it under Facebook and it doesn't accept window.location or ....
It seems everything should be FBJS (FB JavaScript standard!) compliant.

Thanks,
ak

0
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 500 total points
ID: 20793724
>> It seems everything should be FBJS (FB JavaScript standard!) compliant <<

Yes.  You can't use something they designed to stop and block.  Now I understand why you had the problem.  If you wanted an alternate way to do it then there isn't.

If you knew the URL could you use window.location.href = "thepage.htm" in a Facebook page?  I have an idea they will stop that too if the prevent the above but you could try it.  That would only be useful though if you were willing to hardcode the URL/page; no fancy "back" link.

bol
0
 

Author Comment

by:akohan
ID: 20794359

>>> If you knew the URL could you use window.location.href = "thepage.htm" in a Facebook page?

No, since facebook uses a parser and replaces all the variables so I won't know what would happend to a name or variable. It is pretty annoying.

Thanks for your resonse.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20798695
Your welcome!  Thanks for the grade, the points and the fun question.

bol
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

640 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question