Solved

can i set a variable inside a noscript tag?

Posted on 2011-09-27
6
736 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

773 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