Solved

can i set a variable inside a noscript tag?

Posted on 2011-09-27
6
832 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 
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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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…

717 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