Solved

can i set a variable inside a noscript tag?

Posted on 2011-09-27
6
685 Views
Last Modified: 2012-05-12
hi
i am in the proccess of ajaxifying my crud. the php all works great and most of the ajax part except one thing.

i have a regular  pagination and i have a jquery pagination plugin. so i want to set a variable $isjs inside the noscript tag. and then if JS is not enabled i use my regular pagination and if JS is enabled i`ll use the plugin.

any idea?

best regards
0
Comment
Question by:derrida
  • 4
  • 2
6 Comments
 
LVL 15

Expert Comment

by:Eyal
ID: 36708003
use meta refresh with parameter on first load and save it in the session of the user
0
 
LVL 1

Author Comment

by:derrida
ID: 36708029
how can i do it inside the noscript tag? i need a variable that let me know if javascript is enabled or disabled?
0
 
LVL 15

Expert Comment

by:Eyal
ID: 36708199
you can't write/use any javascript if the browser is not supporting it

<noscript>
<META HTTP-EQUIV=Refresh CONTENT="1; URL=http://www.yourdomain.com/?supportjs=0">
</noscript>

and do everything from the server
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:derrida
ID: 36708259
hi
maybe i did not explained myself correctly: i do not want to redirect, i just need to set a variable according to the status of javascript.

the issue is that php as server side does not know about it, so i need a way to let it know.
0
 
LVL 15

Expert Comment

by:Eyal
ID: 36708263
you can't
0
 
LVL 15

Accepted Solution

by:
Eyal earned 500 total points
ID: 36708270
you can't use javascript

so redirect with parameter is your only way to let the server know that
use the meta or link
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now