Script Not Redirecting When Trying To Encode URL
Aug 8, 2011
Page where I'm redirecting user after 5 seconds to another page. This part of the script seems to work fine and redirects to the URL I want. However, the issue comes when I try and add parameters onto the URL. The redirect will stop working. I believe it's a formatting issue, as I've used the code in a different application. [code]...
View 13 Replies
ADVERTISEMENT
Jul 23, 2005
I think my last question was not clear, so people gave me the reverse
answer.
I want to put a string in an html file, and human eyes or robots will not be
able to read it.
For example I want to turn this one
<a href="#" onclick="this.href='http://www.google.com'">click here</a>
into
<a href="#" onclick="this.href=' encoded of h encoded of t encoded of t
encoded of p encoded of :
encoded of : encoded of / '">click here</a>
I prefer bit OR, the ^ opertaion, but ASCII is fine with me, like %40%xx%xx
This plus disable right click will make search engines and view source
difficult but still possible to know where it is linked too,
View 1 Replies
View Related
May 17, 2007
I have a pop up window, that window needs to refresh the parent window when opened, I'm doing the following:
window.opener.location.href(window.opener.location .href);
problem I'm having is that the parent url has a # sign in it, like:
http://localhost/mysite/me.html#01
i need the #01 to stay in the url after the refresh, anyway to do
this? i tried using escape(window.opener.location.href) but that
didn't work, as it escaped everything including the :// in http://
i also tried:
window.opener.location.href(window.opener.location .protocol + "//" +
window.opener.location.hostname + window.opener.location.pathname);
problem with that was i lost the #01 in the url, pathname didn't
include it.
View 5 Replies
View Related
Jul 20, 2005
I've recently come upon an odd Javascript (and/or browser) behavior, and after hunting around the Web I still can't seem to find an answer.
Specifically, I have noticed that the Javascript encode() function behaves differently if a codepage has been set.
<script>
document.write(escape('Ôèëìè'));
(note: that should be five accented characters)
</script>
Produces: %D4%E8%EB%EC%E8
But setting the codepage to Windows-1251:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=Windows-1251">
<script>
document.write(escape('Ôèëìè'));
</script>
Produces: %u0424%u0438%u043B%u043C%u0438
Personally, I wouldn't expect the Javascript encode() function to change its behavior if the codepage has been changed.
Might you know of any resources that can help me better understand what's happening there?
View 5 Replies
View Related
Apr 30, 2009
Do i need to encode my data send through AJAX post? Ex.
var name = $("input#name").val();
var dataString = 'name='+ name;
///////////////////////////////////////////////
$.ajax({
[Code]....
View 2 Replies
View Related
Jun 25, 2009
I have this JSON file that does the encoding from the states database.I want to extract it out using jquery and populate the select dropdown box. the json file is being encoded in this way:
[
{"State":{"name":"AUSTRALIA CAPITAL TERRITORY"}},
{"State":{"name":"NEW SOUTH WALES"}},
[code]....
View 5 Replies
View Related
Feb 23, 2009
I could have sworn I saw a command that allows Javascripts to use the browser's native base64 encode/decode but I must be Googling for the wrong terms. Do most browsers expose these converters to javascripts's there a way to use these converters?
View 1 Replies
View Related
Jul 23, 2005
How would I modify this form to encode *all* the characters in the 'source' textarea to the
'%xx' format & place result code into the 'output' textarea?
View 4 Replies
View Related
Jul 27, 2011
How could a make a basic javascript encoder that can encode and decode text?
(i just would want some tips on how to start)
View 20 Replies
View Related
Oct 25, 2010
I want to encode and decode a javascript file in which many javascript function running.
i fount lot of function decode and encode but not worrkking well .
View 3 Replies
View Related
Oct 20, 2010
I am working on creating a JSON feed that is later being used with Arshaw's fullCalendar, which I am integrating into Expression Engine CMS. Currently I am doing the following, and all works well.
<?php $ms_title_array = array(); ?>
<?php $ms_start_date = array(); ?>
<?php $ms_due_date = array(); ?>
[code]....
What I am curious about is I am trying to create another array set that is pulling new information from a different source. Is it possible to use the json_encode(); method to encode two separate variables?If not, is there a way I can create the event variable and store both the information you see in the while loop with information that I would store into a new while loop? I'm a little stumped
View 3 Replies
View Related
Jun 12, 2010
I have acollection of local variables populated via Flash movies and scripts, and now I need to submit an ajax post (can also be get, but prefer post). I have tried:
$.ajax({
type: "POST",
url: "/myurl",
data: "p1=" + localParam1 + "&p2=" + localParam2,
success: function(msg){
alert( Bingo: " + msg );
}
});
The problem with this is the encoding of the localParam1 and localParam2 sometimes breaks the normal & delimeters. An even more problem is I sometimes haveupwards of 25+ local variables that I need to submit. These inline +s makes it feel, and look, like one huge hack - not to mention the encoding. One last restriction: I cannot use any jquery plugins due to the company's policy. So, I'm looking for something small and light as a solution - not a plug-in. Isn't there an easy way to do this? ONe thought I had was to create a new <form> on the page, and insert the variables as new <input /> fields - and then finally submit the entire form. Again, a big hack + css
View 2 Replies
View Related
Jul 23, 2005
What I want to achieve is to display a login screen in a certain size and
appearance window with no toolbars etc.
To achieve this I think I need to use redirection, but I am not sure how or
what is the best way?
The problem I am facing, that the user may get to the login page from
different pages, or simply from typing in the address of the login page.
In order to make the window appear as I like I need to pen a new one...?
View 7 Replies
View Related
Jul 20, 2005
I am new to JavaScript and I have been sifting through the previous
posts about some specific help I need with a redirect problem. No luck
there! Could someone take a look and give me some suggestions. I could
really use some help.
What I am trying to accomplish is the following:
-grab the user bookmarked URL.
-strip some of the URL from the beginning
-pass what's leftover of the URL and append that to a new URL.
-i would then like to call this function in the body tag and pass it to onLoad
<HEAD>
<script>
var domain=window.location.href;
var domain2 = domain.substr(0,29);
document.write("https://hfdev1.test.com/rw"+domain2")
function test() {
document.location.href="https://hfdev1.test.com/rw"+domain2"
}
</script>
</HEAD>
<body onload="test()">
View 6 Replies
View Related
Jul 20, 2005
I need to re-direct site visitors to a new URL, but I don't want that
URL to appear in the Address field in the browser. I'm sure I've read
somewhere that there is a way to do this, but I can't find it. Does
anyone know this, or have I dreamt it?
View 1 Replies
View Related
Jun 23, 2009
I want to redirect some users based on their location. Is it possible to do so using JavaScript?
View 1 Replies
View Related
Aug 10, 2004
Hi I'm trying to hack together a simple login (ish). The idea is to give the impression of a login when all I'm really doing is using the password to redirect a client to their own sub directory.
But I'm now stuck. Here's what I've put together so far. I'm a complete novice at Javascript - but I'm sure you'll see that.
Code:
<body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function submitentry(){
var password = ''
password = document.login.password.value.toLowerCase()
if (password != null) {
location.href= password + "/index.htm";
}
// End -->
</SCRIPT>
<form name="login">
<strong>Enter username: </strong>
<input type="text" name="username2" size="15">
<br>
<strong>Enter password: </strong>
<input type="password" name="password" size="15">
<input type="button" value="Submit" onClick="submitentry()">
</form>
</body>
View 2 Replies
View Related
Jun 27, 2006
I was wondering is there any way that I can use javascript on a button click that it redirects an iframe that is on that page?
View 1 Replies
View Related
Jul 23, 2005
I'm working on a page that uses javascript very much. My problem is now
that i cannot redirect to another page in IE with window.location =<URL>;
This command gets executed (proofed with alert messages) but nothing
happens. FF acts like expected but i cant get it work in IE. What can be
the problem here?
here the code i use:
this.NodeSelected = function( node ) {
if ( node.Value != null && node.Value != "" ) {
window.location = node.Value;
}
}
View 3 Replies
View Related
Jul 20, 2005
I have a modest website that uses a lot of Javascript.
If anybody views the site and does not have Javascript enabled I want to
politely redirect them to another page, so I put this bit of code in my
<head> section :
<script type="text/javascript"
language="JavaScript">document.write("<!"+"--")</script>
<meta http-equiv="Refresh" content="0; URL=noscript.html">
<!--//-->
So far so good.
It appears to work, *and* it passes the the 'W3C MarkUp Validation Service'
test ( http://validator.w3.org/ ).
Now the bad news: Google doesn't index my site any more, presumably because
their crawler always gets redirected.
Does anybody have a solution to this dilema, please?
Redirecting to a 'with-script' page is not an option because my page is
linked-to by many other sites.
View 11 Replies
View Related
Jan 31, 2006
I want to redirect all pages from one website to another. They will be permanent redirects, but I am looking for a way to make it look cool.
Is it possible (It does not HAVE to be a 301 redirect) that when someone goes to a page on the old website, they automatically go to the new website with a message explaining the transfer, and everything around the message goes grayscale until the user clicks ok...?
View 2 Replies
View Related
May 6, 2010
Why is it that we use bridge pages that say 'If you're not redirected...'.I can see it if you've moved a page and want the user to see the new url before redirecting, but are there other reasons? Does a meta refresh or window not work in some browsers?
View 2 Replies
View Related
Sep 7, 2010
Following is my problem def: Load a HTML page and set the form fields on that page and submit it using javascript. I tried following code: I wrote a html file with following code in it.
<html>
<head>
<title>Test</title>
[code]....
View 1 Replies
View Related
Jul 2, 2009
I want to know if there is a way to prevent users from manually typing in the URL and entering the page after they have already signed out?
I was able to make the back button disabled.
Let's say if they have already click logout and when they click back, it won't go anywhere, which is what I want.
But, if they manually type in the url address, it will take them to that page. What I want to do is after they logout and whenever they try to type the url, it should not take them to that page, but instead to the login page.
View 2 Replies
View Related
Jun 27, 2004
I'm working in an .asp page where the user can delete a record. However i want an alert window to be displayed when the user clicks on delete asking the user if he really wants to or not ( the kind that has the two buttons ). If the user clicks no then the record delete is cancel, and if the user click yes then if goes to the page where it will be delete it.
View 1 Replies
View Related
Sep 2, 2004
I have a website contains a login screen. When someone logs in it redirects them to a website.
Ok, I need to continue to redirect but I also need to be able to record
there login names to a database or text file.
My boss would like me to keep a record of who logs in during the day.
Is this possible? Code:
View 1 Replies
View Related