Jump to content

jwermont

Members
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jwermont

  • Rank
    Newbie
  1. Thanks again. I was reading about this on other sites, and most of them did give suggestions about javascript code. A few claimed that it could be done with css only, but in the comments people were mostly saying these ideas didn't work. I don't want it that badly. Mostly I just don't want the scroll bar. I made it bigger, and that problem was solved, at least!
  2. Ingolme - Thank you, that solved it! I would like the iframe's height to conform to the content that is in it, so depending on what is loaded there, the box will have a different height. (I don't intend to load any content there that's too long.) I looked around and discovered the css overflow attribute. But I don't understand the difference between the "scroll" and "auto" values. As far as I can see, both of them result in a scrollbar when the content overflows the box. Is there no attribute that will give the element more height if needed? (The element being an iframe in this case.) Also, I'm curious: what's the difference between the overflow and overflow-y attributes? Thank you!
  3. I created an iframe to display some text. I set the background color of the iframe to white. The iframe is inside a div element called "content." The colors work fine as long as I keep the height a certain number. (It's not clear what the exact number is, and it's probably dependent on other factors which I haven't figured out yet.) If I increase the height of the iframe beyond that, the background color of the area below the "cutoff" height takes on the same color as the enclosing div element. Here's the definition for div.content: div.content { position: absolute; top: 0; left: 250px; margin-left: 0; margin-right: 0; font-family: 'Lato', sans-serif; font-weight: 400; font-size: 14px; padding: 25px; background-color:#FFFBCF; } This is the iframe definition. It is enclosed in the content element: <iframe src="init_iframe.html" style="height:300px;width:560px;border:3px solid #black;" name="iframe_a"></iframe> I don't understand why it would do this. Anyone have an idea? Thanks.
  4. Thanks - I think the problem was caused by an error in my JS code, which caused the whole script to be thrown out. Fixed that, it works now.Joyce
  5. Hello,I have the following code inside the <head> section of my HTML file. The style definitions in these CSS files are not being recognized. Does anyone know what's wrong? <script language="Javascript" type="text/javascript">switch (navigator.appName) { case "Netscape": document.write('<link rel="stylesheet" href="stylemoz.css" type="text/css" media="all">') break case "Microsoft Internet Explorer": document.write('<link rel="stylesheet" href="styleie.css" type="text/css" media="all">') break default: break}</script> Thank you,Joyce
  6. I recently registered a domain at godaddy.com. I set up the forwarding so that when my domain name is entered at a browser, my porfolio page at sonic.net comes up. So when you type http://www.joycewermont.com in the address bar, it loads my web developer portfolio from sonic.net. (actually located here:http://home.sonic.net/~jwermont/portfolio/...ev/samples.html ). But when you look at the address bar, it says www.joycewermont.com. Hooray! The forwarding and masking works great - so far.However, if you click on one of the links in the portfolio section, the correct page will come up, but it still says www.joycewermont.com in the address bar. That seems totally wrong to me. It should not show my domain name in the address bar when the browser is pointing to a page that isn't even on my site.Example:From the web developer portfolio page at http://www.joycewermont.com, you can go to a number of sites I've developed. The third one, "Kensington Research Group"(which is located here: http://www.kensingtonresearch.net/ ), will bring up that page, but if you click to it from my portfolio page, it will still show my domain name in the address bar. If you then click on "Our History of Success" from the Kensington Research page navigation bar (on the left), you will find lots of links, and you can click away forever, and the address bar will still say www.joycewermont.com.When I asked tech support at godaddy about this, they said, "That's the way our masking works. If you want it to behave differently, you'll have to code your HTML differently."Is this correct? And if it is correct, does anyone know what I need to do to put the right URLs in the address bar?Thanks,Joyce Wermont
  7. I have an HTML form with a checkbox type input. When I analyze the input on the server side, I notice that the checkbox element is only sent back to the server if it is checked. Otherwise, that element is not returned to the server at all.I'm using the POST method in the form, and the input element looks like this: <input type=checkbox name=gifted> If the user checks the checkbox, the "gifted" element will contain the value "on".If the user does not check it, there is no "gifted" element in the data sent to the server.Is there a way to force the POST to send a value of "0" (or something like that) when a checkbox is not checked by the user? All the other input types send something back, if only a null value in the case of no input.The reason I'm asking is that, in the server-side code, I try to check for the value of the checkbox, but if that element is simply missing, the test for the value doesn't work properly. (Makes sense - hard to test the value of something that doesn't exist!)Alternatively (if there's no way to force the POST to send a null value for an unchecked checkbox), is there a way to test the input buffer on the server side to see whether that element is there?Thanks,Joyce
  8. I didn't realize that! (Obviously. )It works fine, as far as the appearance of the page is concerned.I can change it to a <div>, though, no problem there. Can you have nested <div>'s?Thanks,Joyce
  9. Hi,I validated a CSS file and it reported a parse error in the first line, where I had the <style> tag. When I removed the tag (and just started the file with my style declarations), the file validated completely. The same thing happened when I validated the CSS file directly, and via the HTML file that links to it.Are the <style> and </style> tags no longer allowed in a CSS file?The files are here:http://home.sonic.net/~jwermont/portfolio/...ev/oldstyle.css - with <style> taghttp://home.sonic.net/~jwermont/portfolio/webdev/style.css - without tagThanks,Joyce
  10. I have a simple file that almost passes HTML 4.01 Strict validation, except for two errors: two closing paragraph tags that are flagged as 'end tag for element "P" which is not open.'The tags are like so: <p class="outer paragraph"> <p class="inner"> Stuff.... </p> <p class="inner"> More stuff.... </p> </p> It's the final </p> that's caught as an error. (I got two errors because there was another piece of the code similarly structured.)The close tags for the inner paragraphs were not flagged as errors. When I removed the two outer close tags, the page validated.Here are the real pages:http://home.sonic.net/~jwermont/portfolio/...v/samples2.html - doesn't passhttp://home.sonic.net/~jwermont/portfolio/...ev/samples.html - passesI don't understand this. Doesn't HTML 4.01 require close tags for all tags? Are nested paragraphs not allowed? Is there a bug in the validation? Could somebody explain this?Thanks!Joyce
  11. Hello,I would like to know whether Javascript allows a variable name (either as a string, or as the actual address of the variable) to be stored in another variable, and then referenced through the second variable.Say I have a bunch of variables: var0, var1, var2, and so on. I don't know until run-time how many of these variables there will be. That number is stored in "somenum", which could be different each time the page is loaded. I want to be able to indirectly access the contents of each of these variables.Here's a piece of code that might do this, if I had an indirect-reference operator or function:for (i=0; i<somenum; i++) { thisvar = "var" + i alert <indirect-reference operator/function/etc>thisvar)}I haven't been able to find anything that even addresses this issue in either of my Javascript books, which makes me wonder if Javascript even has that capability. But if it does, how does one access the "value of the value" of a variable?Thanks,J
  12. Hello,In a .CGI file, I'd like to include some Javascript code (which will bewritten to the output file sent to the client's browser), which willaccess Perl variables that were set in the same CGI file.It seems to work in some cases. For example, I have a CGI file thatincludes this code: #!/usr/local/bin/perl ... Perl code ... $loopcount = 4; ... more Perl code ... print << "ENDOFPAGE"; ... HTML code ... <script language="Javascript" type="text/javascript"> for (i=0; i<$loopcount; i++) { document.write ("Hello world<br>") } </script> ... more HTML ... ENDOFPAGEWhen this page is displayed in the browser, you see:Hello worldHello worldHello worldHello worldSo clearly the Javascript code recognizes the Perl variable $loopcount,or the value of $loopcount was made available during the execution ofthe Javascript.Can you do this with Perl array values, too? So far I haven't had anysuccess. Can anyone recommend a good site (or book) that addresses thisissue?Here's my reason: I'm using Javascript to validate an HTML form, andI want it to be done on the client side. This works fine for checkinginvalid types of input (eg, numbers where letters should go, etc), butI also would like to make sure that what is being typed into a textinput field is not a duplicate of something I already have stored ina database.Since I can access the database from my Perl script and store the valuesin a Perl array variable, I'm thinking I could then download the arrayto the client, so that the Javascript code can compare typed input withvalues in the array. Since I was able to download the value "4" in thePerl variable $loopcount, shouldn't I be able to download an array ofvalues to the client?(By the way, this is a *very tiny* array of database values. If itinvolved a large amount of data, I would check for duplicates on theserver, after the form was submitted, since I imagine the time itwould take to download all that data to the browser would undermineany performance savings you get by doing client-side checking.)Hope this makes sense. Maybe I should post this to a Javascript groupas well, but I'm hoping that some of you might be familiar with bothlanguages and can advise me.Thanks!J. Wermont
  13. Blue wrote: > Take the javascript out of the CSS file, and create a new .JS file, with: > > switch (navigator.appName) { > case "Microsoft Internet Explorer": > document.write(...) > > ...etc... > > > In. Upload that to your host, and use: > > <script src='http://link/myfile.js'></script>OK, I tried this - created a file called style.js, into which I put only the style definitions that are different for each browser. I took those out of my main style.css file, but kept style.css for all the other definitions.Then, in the HTML file, I had two link statements:<link rel="stylesheet" href="style.css" type="text/css" media="all"><script src='http://link/style.js'></script>These were between <head> and </head>.However, the style definitions in the .js file did not get incorporated into the page in either IE or NN. (The other ones, in style.css, did show up correctly on the page). Was the above the correct setup, or did I misunderstand something you said?Thanks.
×
×
  • Create New...