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
Solved

can i set a variable inside a noscript tag?

Posted on 2011-09-27
6
753 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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

839 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