From client side, I access with https. In my code - alert(location.protocol) // pop up https
-
-
new Ajax.Updater("sip_tab_content",
-
"/rails/test_modules/show/" + $F("boardid"),
-
{method :'get',
-
onFailure:displaySIPTabFailure,
-
onComplete:displaySIPTabFailure
-
});
On server side, is ruby on rails: - def show
-
@test_module = TestModule.find(params[:id])
-
File.open("C:\\rubylog.txt", 'w') {|f| f.write(request.url)} # I get http://....... here
-
respond_to do |format|
-
format.html # show.html.erb
-
format.xml { render :xml => @test_module }
-
end
-
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.
3 3424
I'm not sure whether RoR can handle https request properly by default.
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.
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..
Sign in to post your reply or Sign up for a free account.
Similar topics |
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">
|
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)
|
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'},
|
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\',
|
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(){
| |
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',...
|
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()
|
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...
|
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...
|
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...
|
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...
| |
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |