|
Read the link I gave - it explains the Session Object in some detail. But the whole point of having a Session Object is to maintain a link between the client and the server, otherwise a server has no way of telling any particular browser's request from anyone else's. In effect, Session variables are cookies (that expire when the browser closes...) sent back to the server on each page request - and the server keeps a record to match against them, but expires this after the Session Timeout period (to avoid an ever increasing drain on resources.)
This is why, if you wait too long between page requests, although your "session cookie" gets sent to the server, it can no longer match it and so tells you your session has expired. And if you close your browser down, of course, your sessins cookies are lost anyway and so can't be sent back to the server on your next request.
|
|
|
|
|
I didn't notice the link. Thanks! This is very helpful.
Rafferty
|
|
|
|
|
Hi all.
How can I send a Form with AJAX (Post method)?
It means is there a free AJAX script about it
Thank you
|
|
|
|
|
Hi,
I suggest using one of these frameworks : ExtJS, Prototype, Dojo, Scriptaculous...
It would make it much easier.
|
|
|
|
|
I have a iframe in my page a.html, the iframe points to page b.html, every time when the page loaded completely, the iframe display the top of page b.html
My request is to scroll down the iframe so to display the bottom of b.html when page loaded
I can invoke below javascript when body.onload event occur:
windows.my_frame.scrollTop = 800;
it works with b.html which is on the same server with a.html
but if the src of the iframe points to the page out of the server(http://www.google.com), the script invoke run time error which means I have no right to set the scrollTop property
I can not find and solution or even any explanation on the internet, so came here. Thanks for the help!!!
|
|
|
|
|
Please explain where have you placed your script and from where do you call it. Just try to alert something in the script to check if its even called or not.
|
|
|
|
|
Hi, below is the script
function scrollFrame(x, y)
{
if (window.myFrame&&window.myFrame.scrollBy) {
alert("bbb");
var ifr = window.myFrame;
ifr.oldPageYOffset = ifr.pageYOffset;
ifr.scrollBy(x, y);
}
}
function test()
{
alert("aaa");
scrollFrame(50, 50);
}
I call it in the body.onclick()
the alert did popup, so means the the function is called but runtime error told me I can not access the property of oldPageYOffset neighter the function scrollBy(x,y) if the frame points url off site
|
|
|
|
|
You can not do anything at all to a page that is loaded from a different domain. It's a security restriction in the browser.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Yeah, I got the information.
But any idea in other ways about how to realize this requirement
|
|
|
|
|
If you want to change the scroll position of the page in the iframe, that code would have to be in that page, not in the page containing the iframe.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi
I had a font file (Channels.ttf), I installed it. Its name is CHANL.
Now I use this CSS code in my local HTML file.
.productText{
font: bold 36pt CHANL;
color: #b3c800;
padding-left: 11px;
}
But the text doesn't show with CHANL font. I test it in FF3 and Opera9.5
What's wrong with it ?
Thanks for your suggestions
|
|
|
|
|
Hi,
Use
.productText{
font-family:CHANL;
font: bold 36pt ;
color: #b3c800;
padding-left: 11px;
}
Hope this helps
|
|
|
|
|
Thanks Jaffer.
I used it but it made no difference.
|
|
|
|
|
Custom fonts were part of the CSS-2 standard, but due to the differences in browser implementation, the standard has since been dropped by many of the mainstream browsers.
In this case it might be better to use a standard font for whatever you want to do, or use an image or Flash object containing the text you want to use in this custom font, if this is more appropriate.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
Hi all.
I saw something like this somewhere :
.rightSide searchBox{
}
What's the meaning of it in CSS ?
It means we have a something like this :
<div class="rightSide ">
<div class="searchBox">
</div>
</div>
Thanks in advance
|
|
|
|
|
Mohammad Dayyan wrote: .rightSide searchBox{
}
It's almost certainly a bogus selector. searchBox would have to be a tag name (class names in selectors are prefixed by a dot) - if you were styling a custom XML format, then that's a possibility... but not in HTML.
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
Thank you.
So, How we can write a class that affect any div tags within rightSide tag.
|
|
|
|
|
Mohammad Dayyan wrote: So, How we can write a class that affect any div tags within rightSide tag.
.rightSide div ...will match any DIV elements within an element having a class of rightSide .
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
|
Hello, I am trying to write a simple javascript and am having a bit of trouble.
I have an object that has a height of "309" and a width of "589"
and an image with a height of "190" and a width of "216"
I simply want the image to cover the top right hand corner of the object. I am wondering if anyone could provide the code to accomplish this?
Thanks
|
|
|
|
|
You'd need to get the top and left pixel co-ordinates with:
var top = object.style.top;
var left = object.style.left;
You'd then need to change the image's top and left values:
image.style.top = top;
image.style.left = left+(589-216);
Note that the image must be positioned as absolute to place it over the object.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
Thanks
It did not seem to work properly. I'm sure there is something wrong with my code.
This is what I have so far...
var top = object.style.top;
var left = object.style.left;
<object type="application/x-shockwave-flash" height="309" width="589" data="http://videos2.videobloom.com/container.swf" allowScriptAccess="never" allowNetworking="internal">
<param name="allowScriptAccess" value="never" >
<param name="allowNetworking" value="internal" >
<param name="movie" value="http://videos2.videobloom.com/container.swf" >
<param name="flashvars" value="contentId=48ea33ceb84fb" >
<param name="wmode" value="transparent" ></object>
image.style.position = absolute;
image.style.top = top;
image.style.left = left+(589-216);
<img alt="" src="http://app4.websitetonight.com/projects/5/2/0/6/520685/images/video_list_cover_hkpg.jpg" uid="ece60e54-bc33-4328-92ec-6815c5488089" wstxclass="Image" mainsrc="http://app4.websitetonight.com/projects/5/2/0/6/520685/images/video_list_cover_hkpg.jpg" /></p>
Could you help me fix it?
|
|
|
|
|
Okay:
- Any Javascript in the page must be put in
<script> tags. - Sorry I didn't make it clear -
object and image were just names assigned to the image and the object to demonstrate how you would do it. They must actually be assigned a value (the handle to both objects - see the code below) - As
absolute is a string and not a variable, it must be put in speech marks (""s). - It would also be beneficial to put the two bits of Javascript together (it helps to neaten everything up, too).
- Also, after looking at your code, it would be better to use the
offsetLeft and offsetTop properties of the object, as this will account for any page margins etc.
This comes out as:
<object type="application/x-shockwave-flash" id="object" height="309" width="589" data="http://videos2.videobloom.com/container.swf" allowScriptAccess="never" allowNetworking="internal">
<param name="allowScriptAccess" value="never">
<param name="allowNetworking" value="internal">
<param name="movie" value="http://videos2.videobloom.com/container.swf">
<param name="flashvars" value="contentId=48ea33ceb84fb">
<param name="wmode" value="transparent" ></object>
<img alt="" id="image" src="http://app4.websitetonight.com/projects/5/2/0/6/520685/images/video_list_cover_hkpg.jpg" uid="ece60e54-bc33-4328-92ec-6815c5488089" wstxclass="Image" mainsrc="http://app4.websitetonight.com/projects/5/2/0/6/520685/images/video_list_cover_hkpg.jpg" /></p>
<script language="Javascript">
var object = document.getElementById("object");
var top = object.offsetTop;
var left = object.offsetLeft;
var image = document.getElementById("image");
image.style.position = "absolute";
image.style.top = top;
image.style.left = left+(589-216);
</script>
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
Perfect!
Thank you so much!
|
|
|
|
|
I guess you can do it with CSS:
.topRight{
background: #CC9900;
top: 0px;
height: 150px;
width: 150px;
position: fixed;
float: right;
}
|
|
|
|