|
Hi All,
I have create a web page in my local host.
The web page has a Iframe which only able to work on my computer when i type "http://localhost/"
to view it on my own computer.
When im using my Colleague computer and type my computer's IP Address which is connected to the same local area network.
The whole Web page expect the Iframe part works.
The code for the Iframe is
<iframe src ="http://localhost/cgi-bin/6_nodeid.cgi" width="28" height="40" scrolling="No">
<p>Your browser does not support iframes.</p>
</iframe>
But if i type just "http://localhost/cgi-bin/6_nodeid.cgi"
( where the 'localhost' is replaced by my computer's ID ADD)
in my colleague's computer, it works.
Any possible solutions?
|
|
|
|
|
The line
<iframe src ="http://localhost/cgi-bin/6_nodeid.cgi" width="28" height="40" scrolling="No">
gets processed on the client computer, not the server. So when you run it on your computer, it points
to something on your machine. When you run it on your colleague's machine, it points to a resource on
their computer.
The way around this is to have the server set the "http://localhost/" part of the address at the time
the page is served, or to hard-code the ip of your machine (which will work fine for local, intranet pages)
What you've been doing manually (replacing the address) is something you need to do automatically.
(you can check the ip of the client and do nothing if its 127.0.0.1 or set it to the IP address of the
server if the client request originates from a machine other than the server) Without knowing your
requirements etc, I can't see any reason not to make the server automatically insert it's own IP regardless
of who the client is. This way the software will be portable between machines without needing to change
the hard-coded IP address each time.
|
|
|
|
|
link to site[^]
As you see, go to HOME, CONTACT US or SITEPLANS and there is a consistancy, but go to GALLERY and there is a gap at the top.
I can't see why, can anybody help?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
You are going to kick yourself and I might hear your scream all the way from sunny Norfolk ...
In your gallery page your code includes
</style>
<link rel="stylesheet" href="css/image-slideshow.css" type="text/css"/>
<script type="text/javascript" src="js/image-slideshow.js">
</script>
and
<body background="images/headerimage.png">
That body tag background you are calling that image twice, in the body and the div below, which isn't in your other pages.
This webpage calls your stylesheet ...
body{
background-image:url('../../images/heading3.gif');
background-repeat:no-repeat;
padding-top:80px;
}
That stylesheet isn't called by the other pages consequently you have this 80px padding at the top where your body tag is. the image (../../images/heading3.gif) can't be found.
You haven't yet fixed your security problem
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Can you hear me?
What a doofus, have corrected by removing the CSS background image url.
All is good.
I looked at it for ages, and it just didn't occur to me that it was double calling the background.
Anyway, now that I have stopped screaming, I shall start the kicking.
As for security issue, I have been far too busy to even take a look at it.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
Duplicate code helps nobody. Move your CSS styles to an external style sheet. For a small website like yours, version control (such as http://www.tortoisesvn.net/[^]) might be overkill. So as stated next door, delete your old code rather than commenting it out. If you must retain your old code, name the file accordingly (such as .bak or .old) so you know it is no longer valid and no longer used.
Dave, don't wait for disaster, secure your website before it becomes compromised, especially if you intend a future server-side code and database functionality.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
I second that notion.
When it comes to using CSS over multiple pages, there are many good practices to keeping things neat and tidy.
For example, external linking, I use a master.css file for the entire site, with global stuff; then I make proprietary CSS files for pages that might need some of their own special code (IE, a gallery, or contact-form maybe).
Version Controlling on websites is normally only necessary when you are dealing with a site that is being worked on by a bunch of clients, though it is a good practice to become accustomed to for future knowledge.
Also, I'd recommend trying to use reset.css often. It helps with a lot of bugs that can make you lose time, I know it saves me lots of time when it comes to doing cross-browser comparison. However inserting reset.css into a site that has been built without it can harm it in some cases, which is why it is better to have it linked at the beginning of your project.
you can get reset.css here:
http://meyerweb.com/eric/tools/css/reset/[^
|
|
|
|
|
Reset.css I didn't mention that particularly, although I use it myself. I didn't wish to overload Dave with too much stuff all at once.
And with IE8 and earlier not playing nicely with regards to standards, the need for code to force some degree of compliance.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
BTW could you recheck to see if I have hidden the subdirectories correctly.
(I am not an expert on these matters).
TIA
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
OK. I will do that shortly and report back. I have a potentially waste-of-time meeting to attend. If need be I will e-mail you via the CP link.
.
Check your e-mail inbox
modified on Friday, April 23, 2010 8:43 AM
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hi,
I am using a DIV tag . Earlier i was using Popup which has below allignment values. Due to some problems we thought not to use PopUp and using Div.
XPos=48
YPos=69
Width = 160
Height=138
I want my DIv tag to be opened with these values.Can you please suggest how I set these values for Div.
Thanks,
Salmon.
|
|
|
|
|
|
You beat me to it!
Used similar links too, damn phone calls.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
They are invalid under the DIV tag, but can be set as a Style in CSS.
See Here[^]
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
Hi dave/Tony,
Thanks for your reply I am using below in Div tag
<div id="divID" style="z-index:1000;width: 160; right:50px; top:60px; display: none;position:absolute;">
It looks ok.
My problem is one control is there Behind Div ,sometimes the control Text is overlapping with Div control Basically this Div displays Calender.
Can any one please suggest.
Thanks,
Salmon
|
|
|
|
|
When you mark a css style with "position:absolute;" it disrupts the flow of the document as other content do not know if its existence, sometimes that is exactly what you need. Also, sometimes it is necessary to clear the css style using "clear: both;"
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hi Richard,
Can you please provide what code i need to implement to fix this Issue.
Please suggest.
Thanks,
|
|
|
|
|
Not knowing how your document flows (the HTML + CSS + JS), I can't offer you any code snippets. I'm not a mind-reader. I don't know what your code needs because I don't have access to the source code. And I certainly don't know what your "brief" is with regards to the look/feel/functionality of the web page/website.
The absolute property does not flow with the document. Relative property does. The clear tags is there to use where some incompatibilities between the CSS implementation by the various browsers causes certain display issues.
Experiment with relative properties as well as the clear tags. You might also wish to familiarize yourself with the CSS Box Model. The link above (provided by CP Member Tony Richards) to w3schools will have data about that.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
salmonraju wrote: Earlier i was using Popup which has below allignment values. Due to some problems we thought not to use PopUp and using Div
<html>
<body>
<div onmouseover="document.getElementById('myPopDiv').style.visibility='visible'"
onmouseout="document.getElementById('myPopDiv').style.visibility='hidden'">hoverMe
<div id="myPopDiv"
style="visibility:hidden;position:absolute;top:69;left:48;background-color:red;"
>I have popped</div></div>
other content<br>other content<br>other content<br>other content<br>other content<br>
</body>
</html>
|
|
|
|
|
hmmm... I guess it's have looks like this:
#ground {
background-color:#111;
opacity: 0.65;
filter:alpha(opacity=65);
position:absolute;
z-index: 9001;
top:0px;
left:0px;
width:100%;
}
#popUpDiv {
position:absolute;
background-color:#eeeeee;
width:300px;
height:300px;
z-index: 9002
You can try learn more on html css tutorial. Seemed I met this info there
|
|
|
|
|
i want to display a context menu on mouse right click, but window.event is not working in mozilla
|
|
|
|
|
window.event doesn't work in Mozila.To work in both, get the event like this
event = event || window.event;
This will work in both IE and mozila as well.
|
|
|
|
|
event = event is also not working in mozilla.
It gives an error "ReferenceError: event is not defined"
|
|
|
|
|
can you put your code snippet?
|
|
|
|
|
var rightclick
if (!e)
var e = event || window.event;
if (e.which)
rightclick = (e.which == 3)
else if (e.button)
rightclick = (e.button == 2)
This gives an error in Mozilla
|
|
|
|