473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Not Working Javascript alert in https

190 100+
Hi I tried simple javascript + form in https. But javascrip alert is not working in some https. Can any one know that why it is not working

My sample code is

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script>
  4. function hi()
  5. {
  6. alert("gu");
  7. }
  8. </script>
  9. </head>
  10. <body onload="return hi();return false;">
  11. <form  name="Import" method="POST" onsubmit="return hi()" enctype="multipart/form-data">
  12. <input type="submit" name="submit1" value="submit">
  13. </form>
  14. </body>
  15. </html>
  16.  
  17.  
Nov 10 '08 #1
10 3136
acoder
16,027 Expert Mod 8TB
When are you expecting it to alert? Why do you have a return false in onload after a previous return? onload doesn't require a return statement anyway.
Nov 10 '08 #2
iam_clint
1,208 Expert 1GB
well one thing is you are using return hi() but the hi function isn't returning anything.
Nov 10 '08 #3
maheswaran
190 100+
hi,

Am not need any return value. Just i want to get the alert. Why this is need is am have one project , on that project alert is working in http:// and not work in https://
. So am just trying with this simple example and i could not succeed , can tell me why this?
Nov 15 '08 #4
acoder
16,027 Expert Mod 8TB
Try
Expand|Select|Wrap|Line Numbers
  1. <body onload="hi();">
Nov 15 '08 #5
maheswaran
190 100+
Sorry it not working
Nov 18 '08 #6
acoder
16,027 Expert Mod 8TB
OK, add a button and try this:
Expand|Select|Wrap|Line Numbers
  1. <input type="button" name="btn" value="Click to test" onclick="hi();">
Does this not work at all or only fails sometimes?
Nov 18 '08 #7
maheswaran
190 100+
It falls all time, but i find one thing if am trying with mysystem (which i installed this project) its not work but am trying with network its working...do not why this?
Nov 21 '08 #8
acoder
16,027 Expert Mod 8TB
What do mean by "my system"? Can you describe it? Which browser are you testing on? Have you tried other browsers?
Nov 21 '08 #9
maheswaran
190 100+
My system is where the application is installed.

My system is connected with network. Am using Xamp and installing ssl. while access with localhost it not work. but tried with network (accessing by another computer) its work.
Nov 21 '08 #10
acoder
16,027 Expert Mod 8TB
That means there's nothing wrong with the code, but something with your settings. You didn't answer the question about browsers. Have you tried other browsers?
Nov 21 '08 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: schieco | last post by:
The following code always prints the debug lines inside the conditional if statement before and after the alert statement when the session has timed out, but the alert and redirect only appear/work...
7
by: Bani | last post by:
Is it possible to get browser-menu events (IE) into Javascript? I have a special copy/paste on the onkeydown event (ctrl+c/ctrl+v). Now the users would like to trigger it also from the browser...
14
by: horos | last post by:
hey all, I'm a heavy perl user, not so much a java script user, and was wondering... perl has an extremely nice utility called Data::Dumper, which allows you to dump out the contents of an...
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
12
by: SA SA | last post by:
I know it is me but i can not get this condition to work. Regardless of Check or credit card it always defaults to else portion of the script. I can't get if (login.PMT_INDICATOR.value == "C") to...
1
by: phoenix917 | last post by:
I have been working on this code for 5 days... I have read multiple tutorials and looked at various code. This is my third forum try... :) My instructor refuses to help me. I think it's because...
6
The1corrupted
by: The1corrupted | last post by:
I don't know if this is the right forum or not, but right now, my Javascript, that is embedded in PHP, is not working! It works everywhere else but not here. HELP!! <?php $soldnumber=$_POST;...
1
by: hilather | last post by:
Hey Guys, Before I start I have searched the forums for similar threads and there are a few that sort of cover what I'm asking about, but I havent been able to fix my problem based on those...
5
by: camphor | last post by:
hi, I have found an upload script in hotscripts and have implemented it into the website, I followed the installation steps to 'give write permissions to php on the upload folder (which is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.