473,804 Members | 3,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why has Ajax.Updater missed https to http?

8 New Member
From client side, I access with https. In my code

Expand|Select|Wrap|Line Numbers
  1. alert(location.protocol)   // pop up https
  2.  
  3. new Ajax.Updater("sip_tab_content",
  4.                     "/rails/test_modules/show/" + $F("boardid"),                    
  5.                     {method :'get',
  6.                       onFailure:displaySIPTabFailure,
  7.                       onComplete:displaySIPTabFailure
  8.                     });


On server side, is ruby on rails:

Expand|Select|Wrap|Line Numbers
  1. def show
  2.     @test_module = TestModule.find(params[:id])
  3. File.open("C:\\rubylog.txt", 'w') {|f| f.write(request.url)}    # I get http://.......  here
  4.     respond_to do |format|
  5.       format.html # show.html.erb
  6.       format.xml  { render :xml => @test_module }
  7.     end
  8.   end
I don't know whether Ajax.Updater missed my https. I found articles saying: Ajax.Updater is from Ajax.Request and the latter is from XMLHttpRequest, and XMLHttpRequest can transmit on both http and https. Then where is the problem??

Anyone know?

thanks.
May 9 '10 #1
3 3424
anaconda1977
8 New Member
I'm not sure whether RoR can handle https request properly by default.
May 10 '10 #2
anaconda1977
8 New Member
Also I wrote: f.write(request .port), the value is 80. However, the show page seemed to be displayed with https, for I had banned http and enforce https access on server and the show page under view folder is displayed without error. So I suspect that the request only takes default values for some parameters, as the client is Javascript file, not ruby set the request.url, request.ssl, request.port or others of such. I only guess and not sure of this. If the request is not reliable, I didn't how to judge the request is using http or https from the ruby code, not by my eyes.
May 10 '10 #3
anaconda1977
8 New Member
The second code is in RoR, using MVC mode, in class derived from ApplicationCont roller. Acting as server.
the first is JS file. Acting as client to send request..
May 10 '10 #4

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

Similar topics

1
3171
by: marc.fuehnen | last post by:
hi everybody, tried the framework and build a little SQL Update, triggered by a JS function: <a href="Javascript:updateData()"><img src="../images/thumbs/thumb_blue.png" border="0" /></a> <div id="yeah">
2
4392
by: hardrock | last post by:
Hello! I'm working with the prototype library version 1.4.0 and having a strange error lately. When I want to make an Ajax.Updater call, it basically works. But as soon as I put the call into a function, so that I can call it from a popup, I get the error: "html has no properties" (in Firefox)
1
1546
by: pankajit09 | last post by:
Hello, Is it possible to put two placeholders in Ajax Updater ? or Can I use the same placeholder(div ID ) at two places in HTML? var myAjax = new Ajax.Updater( {success: 'placeholder'},
2
2729
by: lukemack | last post by:
hi, i am trying to make the contents of one drop-down box dependent on the contents of another using AJAX (prototype.js) and PHP I have it working so that a new dropdown appears when i select a value in the first dropdown: <?php echo $html->selectTag('Review/cruiseline', $cruise_lines, null, array('onchange'=>'new Ajax.Updater(\'test\', \'ships?variable=12\',
1
1385
by: winsonlee | last post by:
login: function(e){ var pars = 'name=' + escape($F('name')); var myAjax = new Ajax.Updater('response', 'ajaxServer.php', {method: 'get', parameters: pars}); // if response != '' this.deactivate }, // Example of creating your own functionality once lightbox is initiated deactivate: function(){
2
1943
by: Megalith | last post by:
I'm getting perplexed on this, essentially i have an html file which is using prototype to provide the Ajax. the html has a button which when clicked calls the settings.php file and should display the code generated from the php file but instead it displays the php. can anyone give me a pointer on how to achieve this result? here is the html that i have used. <div id="Layer1"></div> <div id="Layer2" onclick="new Ajax.Updater('Layer1',...
2
5280
by: chrissi | last post by:
Hello Everyone, altought by English is not so ggod, I try to explain my problem... With the prototype ajax.updater it's possible to update a div trough a given url. Is there any possibility to update it with a function? Wenn cklicking on a link, the layer 'mainContent' show be updated with the function Shop::cart()
8
3550
by: luftikus143 | last post by:
Hi there, I recently upgraded to Firefox 3 and suddenly my Ajax.Updater doesn't work anymore. Firefox gives me a "Security Error"... I am using the recent versions of prototype and script.xx.us. I am not an Ajax-geek.... But it worked smoothly in Safari and Firefox until now.. Thanks for giving me hint! <a href='#' onclick=\"variables(); Effect.toggle('datasets','BLIND'); return false;\" >click here</a> <div...
0
10332
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.