HTML Snippet Resizing Box Problem

Hey guys, hope someone can shed some light on this incredibly irritating issue that i've been struggling with for ages.
I've got a javascript for generating a random quote out of a preset list (10) into a HTML snippet box on my site.
The problem that I can't cure is that each quote, depending on its length makes the html box resize around it, so it sometimes covers some of the existing text.
What I want is for the generated text to fit itself into whatever box size I choose.
Any ideas??
<CENTER>
<SCRIPT LANGUAGE="JavaScript"> <!-- Distributed by <a class="jive-link-external-small" href="http://www.hypergurl.com">http://www.hypergurl.com</a>
var howMany = 10 var quote = new Array(howMany+1) quote[0]="A good woman
to a man is like money in the bank." quote[1]="God loved the birds and
invented trees. Man loved the birds and invented cages." quote[2]="The
words that enlighten the soul are more precious than jewels." quote[3]="Prepare
your mind to receive the best that life has to offer." quote[4]="In
order to be walked on, you have to be lying down." quote[5]="Education
is the power to think clearly, the power to act well in the world's work, and
the power to appreciate life." quote[6]="No one can make you feel inferior
without your consent." quote[7]="A person who aims at nothing is sure
to hit it." quote[8]="Shoot for the moon. Even if you miss, you'll land
among the stars." quote[9]="No bird soars too high if he soars with
his own wings." quote[10]="You can't build a reputation on what you're
going to do." function rndnumber(){
var randscript = -1 while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1)) } return randscript } quo = rndnumber()
quox = quote[quo] document.write(quox) // End Script--> </SCRIPT> </CENTER>

Hiya Old Toad, thanks for the reply.
Sorry it took me so long to get back to you, things just keep coming up!
Ok so ,if I try to resize the box, it goes widthways rather than lengthways and therefore covers all the text next to it.
If I add the
tags, it just breaks it completely and nothing shows up.
Also looks like I copied the wrong script when I posted here originally, I had it in a notepad file but I must have opened the wrong one, sorry!
Attached is the actual script from the site,
Thanks again for all your help!
<center>
<resizeable=false>
<script language="JavaScript">
var howMany = 6
var quote = new Array(howMany+1)
quote[0]="'The teacher motivates children in a fun way'"
quote[1]="'Very friendly, fun and hard working class - with an excellent teacher'"
quote[2]="'It's a good way to keep all ages off the streets and meeting new people in a friendly environment'"
quote[3]="'The class is good, giving kids a fun and enjoyable time. The teacher is funny and, also has a good way of handling the class'"
quote[4]="'The class teaches good discipline whilst still having fun'"
quote[5]="'Discipline, respect, enjoyment and fun. All key factors put across by a very good teacher'"
quote[6]="'The class teacher is good and disciplined. It has taught my child to come out of her shell'"
quote[7]="'The class makes learning fun whilst still teaching the students the important lessons needed to progress'"
function rndnumber(){
var randscript = -1
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1))
return randscript
quo = rndnumber()
quox = quote[quo]
document.write(quox)
// End -->
</script>
Gah that last "quo" is meant to have [ 's around it but they dissapear for some reason on here.
Message was edited by: Billbrown

Similar Messages

  • HTML Snippet Error

    I'e seen many YouTube videos on using the iWeb '08 HTML Snippets. The problem is that when I use ANY of the Web Widgets a blank box just pops up.So I just typed the HTML code into the box and published my site. When I opened it there is just the code but it is just acting as plain text. Anyone know how solve this problem?
    Thanks in advance!

    Welcome to the discussions. When the +"blank box just pops up"+, is that the result of clicking on the +Web Widgets+ icon in iWeb's lower toolbar and choosing +HTML Snippet+ ?
    ...You should see a black window appear — do you see that? If so, that's where the snippet code should be pasted.
    If you want to post screenshots here of what you're seeing, go here:
    http://www.imageno.com
    ...once uploaded, from the resulting page, copy & paste the *"HTML code for webpages"* into your forum post and switch to Preview mode to check the clickable thumbnail works.

  • Trying to load flash file in iWeb and when I enter info in the "html snippet" box a "missing plug-in" message comes up (although i have adobe flash player in, if that's the plug-in they're looking for). Anyone have any similar problems or solution. Thanks

    I'm trying to load flash file in iWeb and when i enter info in the "html snippet" box a "missing plug-in" message comes up (although i have Adobe Flash player installed, if that's the plug-in they're looking for). Anyone have any similar problems or solutions. Thanks

    when i publish my site and vew it the page on the web it just comes up with the file name w/ the ,swf and the "mising plug-in" message below. if i click on the file name it displays the flash file but gigantic (the entire height of the page).totally perplexed!
    anyway, here is the code.
    <object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0, 40,0”width=”244” height=”221” id=”ETrade_banner_Gumby_replay”><paramname=movie value=”ETrade_banner_Gumby_replay.swf”><param name=qualityvalue=high><param name=base value=”.”><embed src=”ETrade_banner_Gumby_replay.swf”quality=high width=”244” height=”221” name=”ETrade_banner_Gumby_replay”align=”” type=”application/x-shockwave-flash” pluginspage=”http://www.macromedia.com/go/getflashplayer”base=”.”></embed></object>

  • Problems setting 'allow HTML snippet insertion' in Contribute 4

    I am trying to set the administrator option to allow insertion of HTML snippets (as described here). But the dialog box to change the settings does not include an "Allow HTML Snippet Insertion" checkbox.
    Any advice? Is this to do with the version of Contribute I'm using? Or is there some other administrator setting I need to set first?

    Hi ravster.
    Thanks for the suggestions. I had read the Arch NFS HowTo and did as you suggested get rcpinfo for the server machine. The Libranet NFS server is configured rather different since the NFS daemons are built into the default kernel.
    Since I needed to complete the transfer immediately, I gave up for now trying to set up NFS and used netcat (!) instead to transfer the files from the Libranet laptop to the Arch workstation. The laptop will be converted to Arch Linux soon so I think I'll be able to clear things up soon.  I haven't had any problems setting up NFS with homogeneous (i.e., all Arch or all Libranet) computer combinations.
    Thanks again.
    Win

  • Problem with html snippet

    I have been using iWeb for a long time now, it's been fine up until recently. Everytime I try to add HTML Snippet to my site, it inserts the box on to my webpage, but fails to load in the edit box where you can paste your HTML in.
    How would I rectify this?

    Try the troubleshooting steps under "Fix iWeb" here...
    http://www.iwebformusicians.com/iWeb/iWeb-Tips.html

  • How can I vertically resize an HTML Snippet?

    It will only let me vertically resize my HTML Snippets a certain amount--there's about a centimeter of space in between the bottom of the Snippet and my actual HTML object. It's not just certain HTML Snippets--no matter what it is, this always happens. I used to know a trick for resizing it smaller, but I've forgotten it now.

    Man this is some heavy work; I would suggest moving this on to the "Server" section of support as they have more business workarounds.

  • Posterous blog HTML Snippet problem - not all of blog is showing up...

    Good morning all! So I was looking for a solution for our newly formed website (I'm a novice) where I could have multiple users update our blog page without having to use iWeb to do it. I read up on Posterous and it appears this would be an ideal solution. So I found some code from another Apple Discussions poster, Alancito, that would pull my Posterous blog directly into the iWeb page I created. Well it has done that, sort of...
    I see the header from the blog, but the content isn't visable. Well, actually if you highlight the header or "blog differently" and then hold down like you're scrolling down the page, the info is there. But the HTML snippet always cuts it off. Even if I expand the size of the snippet in iWeb, it ALWAYS reverts back to this same size.
    I'm in a bind here and could really use some help.
    Here's the blog page address: http://www.sporkfoodwagon.com/SporkFoodWagon/Blog.html
    And here's the code I was provided.
    <iframe height="100%" allow transparency="true" frameborder="0" scrolling="no" style="width:100%;border=none" src="http://sporkfoodwagon.posterous.com/"></iframe>
    Message was edited by: andrewrichardson

    Andrew ~ Perhaps someone will suggest a solution to the HTML Snippet problem, but meanwhile, with this recent improvement to Posterous:
    http://blog.posterous.com/posterous-unveils-pages
    ...perhaps you don't need an iWeb site at all. If you must have one, consider linking to your Posterous blog directly from iWeb's navigation bar:
    Create a blank internal page titled "Blog" (actually you can name the page whatever you want.) Then in that Blog page add an HTML Snippet with the following code:
    <script type="text/javascript">
    parent.window.location = "http://www.yourblogname.com"; // change this to your own URL
    </script>
    ...Once published, clicking on "Blog" in the navbar will immediately redirect to your external Blog page. (Thanks to Cyclosaurus for the code).
    And to return from Posterous back to your iWeb site:
    http://blog.posterous.com/pages-20-add-links-to-your-sidebar

  • HTML snippet height problem in all browsers but Safari

    hi i'm trying to embed Vimeo in my webpage using HTML snippet. i thought it was working fine until i found out that in other browsers than Safari the movie is cut off at about 120 pixels..
    i did some testing and now i find that whatever HTML code i try to publish using HTML snippet looks
    cut off ! no matter what the height settings are, and believe me i tried everything, and all sorts of code..
    this is such a mayor bug, i cant understand why i cant find other people with this issue??
    using IWEB 09 last version..
    please have a look at this:
    http://www.geertmul.nl/Geert_Mul/LibraryOfBabel.html
    with both Safari and Firefox.
    see what i mean..??
    thanx for a reply !

    Welcome to the Apple Discussions. I've experienced something similar. Here's how I fixed it. After using the apply button I clicked and dragged the snippet lower border down a long way. Don't worry if it overlaps other items. After dragging DONOT hit the apply button again. Just do a Publish Site Changes and try the page in Firefox again. Be sure to clear the browser's cache so you don't view the previous version of the page.
    NOTE: you might change the caption lines from 2 to 3 in your album pages as a couple of the albums are requiring a 3rd line and it's partially cut off. Also the image for the Split Representation Prints album is giving an error. The link works but the album doesn't have a photo in it.
    OT
    Message was edited by: Old Toad

  • Problems with drop down menu in html snippet

    Hi all,
    I am trying to use a form with a drop down menu so the user can jump directly to the corresponding page. I am using the code generated by http://javascript.internet.com/generators/drop-down-menu.html, and it works correctly when I test it in the "Show me the drop down menu" option on their page.
    This is the html code:
    <!-- ONE STEP TO INSTALL PULLDOWN MENU:
    1. Paste the code into the BODY of your HTML document -->
    <!-- STEP ONE: Copy this code into the BODY of your HTML document -->
    <BODY>
    <!-- Original: Ricocheting ([email protected]) -->
    <!-- Web Site: <a class="jive-link-external-small" href="http://free.prohosting.com/~ric">http://free.prohosting.com/~ric</a> -->
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! <a class="jive-link-external-small" href="http://javascript.internet.com">http://javascript.internet.com</a> -->
    <form name="jump">
    <select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex] .value;" value="GO">
    <option value="">select genre</option>
    <option value="http://www.mygaragebandstudio.com/blues_rock.html">blues/rock</option>
    <option value="http://www.mygaragebandstudio.com/cinematic.html">cinematic</option>
    <option value="http://www.mygaragebandstudio.com/country.html">country</option>
    <option value="http://www.mygaragebandstudio.com/electronic.html">electronic</option>
    <option value="http://www.mygaragebandstudio.com/experimental.html">experimental/new age</option>
    <option value="http://www.mygaragebandstudio.com/jazz.html">jazz</option>
    <option value="http://www.mygaragebandstudio.com/latin.html">latin</option>
    <option value="http://www.mygaragebandstudio.com/orchestral.html">orchestral</option>
    <option value="http://www.mygaragebandstudio.com/urban.html">urban</option>
    <option value="http://www.mygaragebandstudio.com/world.html">world</option>
    </select>
    </form>
    When I paste this code into an html snippet in iWeb, my page does not work correctly after publishing to a folder. The jump to location doesn't open its corresponding page. Instead, it defaults to the same page that has the drop down menu, only the menu doesn't appear any more. Instead, I get a "hole" where the drop down menu used to be.
    This is my URL: http://www.mygaragebandstudio.com/jingles.html
    I examined the code of the page with the html snippet generated by iWeb, and to my surprise I couldn't even find the html code of the form with the drop down menu. Where is it?
    Please help!
    null

    Manuel wrote:
    Green Star for you!
    JSYK,
    You didn't actually give PressWeb the green star by marking his post as the post that solved your question. You merely marked the question as answered but never actually marked PressWeb's post as being the post that answered your question, which will in effect reward PressWeb with the green star as seen by a green star appearing in the header for his post. I only mention this because you have incorrectly mentioned rewarding PressWeb with a green star.
    Hope that helps.

  • Problem Creating an Image Link within an html snippet?

    Hi,
    For some reason I have been unable to link to an image on my Mac by using <img src within an html snippet.
    I have uploaded the photo to my server and created a link with <img src "http://www.domain.com/image.jpg" />.
    However, when I try linking to the image like this - <img src "Users:Documents:Photos:image.jpg" />, when I click apply on the html snippet all I get is a blue dot with a question mark and I have checked that the image is in my Documents and then Photos folder and it is. When I link to it with the server the photo shows.
    Any ideas as to what I am doing wrong?
    I would appreciate some help, as I have tried various combinations to link and nothing seems to be working except linking directly from my server and I don't really want to do this at the moment.
    Thanks

    Thanks for that and I did use correct syntax in the html snippet - it was a typo here.
    I did as you suggested and dragged the photo into the Safari browser, after placing the photo on the desktop and it gave me the file name and that showed as file:///Users/My username/Desktop/Image.jpg, so I tried this in my html snippet and did it as so:
    It is still not working for some reason and when I click apply, the photo shows up as a blue square with a question mark in it, although I know the photo is there.
    Why is this? I followed the path, yet when I link to the photo on the server with it works perfectly everytime.
    Thanks

  • Having difficulties posting my simple viewer in the HTML snippet box

    My simple viewer files are in my site folder Home-sites-jmb-sculptural work
    do I need to upload this to the web to have the HTML address work
    I have gotten other HTML objects to show up... just not my simple viewer
    I have to admit that my skills with HTML involve a lot of cut and paste skills
    I really don't know HTML tech at all

    Yes, you have to upload the SV folder with its file to your iDisk and then add the following code to an HTML snippet:
    <IFRAME SRC = "URL to the index.html file that's created inside the slideshow folder on the hosting server" WIDTH="XXX" px HEIGHT="XXX" PX FRAMEBORDER="O" --if "0" no border, otherwise "1" with border MARGINWIDTH ="Opx" MARGINHEIGHT="Opx" SCROLLING="no" --"no" no scrolling bar, "yes" show always, "auto" showed when need > Your browser does not support IFRAME </IFRAME>
    This demo page, SimpleViewer and Flash Album Exporter, has an example of such a SV presentation and describes the steps how to set it up.
    OT

  • Can't edit HTML snippets

    Hello there,
    This is around the third time I ask about this issue. I installed Leopard with iLife '08, and later (after I started having the problem) installed iLife '09.
    What happens is, when I try to add an HTML snippet, I am presented with a blank box with a white outline, which I cannot alter in any way, save for moving and resizing it. Also, I cannot edit the HTML snippets I added before I had this problem. And finally, the dynamic preview of my blog merely displays the same blank box I described above. This happens in both iWeb '08 and iWeb '09.
    The problem arose after I started poking around in folders such as /Library, /System/Library, and /Users/Sean/Library (I'm not exactly sure, as this was around four months ago). The thing is, I opened iWeb again nearly a week after, so I'm not completely certain there is a correlation, although I consider this the most likely culprit.
    Please don't tell me to edit or delete .plist files, as this has no effect. Nor does creating a new /Users/Sean/Library/Application Support/iWeb/Domain work (which, oddly enough, I thought did, but it was after a Leopard reinstall).
    I would really appreciate if you speculated on which file I need to restore (try adding an HTML snippet in a working iWeb, while running Activity Monitor, and browsing the files it uses?), and I can restore it using Pacifist (http://www.versiontracker.com/dyn/moreinfo/macosx/12743) and my Leopard install DVD. By the way, is it safe to do this, now that I have iWeb '09 installed? I would imagine, since upgrading didn't fix the issue, but I can't be certain...
    Thank you so much for putting up with this,
    SeanDaBomb

    Try Troubleshooting 101: delete the iWeb preference file, com.apple.iWeb.plist, repair disk permissions, reboot and try again.
    If that doesn't help log into another account on your Mac, open iWeb, create a test site and see if you can use the snippets there as intended. If not then a reinstall of iWeb seems warranted. To do so you'll have to delete the current application and all files with "iWeb" in the file name that reside in the HD/Library/Receipts folder.
    If the snippets are able to be used correctly in the other account then there's something in your account that is amiss. Post back with the results.
    OT

  • Weird HTML snippet frame behavior...

    Hi, I am using the HTML snippet to do some CSS stuff. Pasting the code in the HTML snippet box and clicked the Apply button.
    Wow! the snippet frame (normally with 6 small white squares for you to resize the frame to display all the snippet content) suddenly expands to 7,124,555 px in width!!!
    I can't use this snippet without spending 10mins to reduce the width to the proper width.... does anyone come across this problem and found a solution?
    BTW, the HTML code in the snippet references 1 CSS file, and 1 javascript file stored in the proper location on my idisk (the same idisk location iWeb08 would publish my site), and iWeb08 is reading the files OK. If the CSS and JS files are not referenced properly (ie, the files do not exist on idisk), the snippet won't exhibit this weird behavior....
    Message was edited by: Charles So

    Have a look at this page ....
    http://iwebfaq.org/site/iWeb_iframe.html

  • Html snippets don't work in iWeb 09.

    I've not added an html snippet to my site for a while, but they've worked in the past. Now they look fine when I'm working in iWeb, but when I go to the site after uploading, there's nothing visible. If I select all, I can see the box that should be holding the stuff of the snippet. I've tried reinstalling the preferences file and that didn't do anything.
    Here's one page:
    http://virtualfieldwork.org/ReaLBlog.html
    And another (this one you need to scroll down):
    http://virtualfieldwork.org/2011_PD_Application.html
    The formatting at the top doesn't match what I did either -- I made a cross through of the May 10 deadline and the updated information in red. So, there's more quirky than the snippets.
    I recently upgraded to a brand new MacBook Pro and transfered everything via Firewire from my old MacBook Pro. The same problem was going on on the old computer.
    Thanks,
    Don

    The application page (http://virtualfieldwork.org/2011_PD_Application.html) has this:
    <iframe src="https://spreadsheets.google.com/embeddedform?formkey=cjFRUGZ5cFdxLVlLcW1LeXZvOTJ weFE6MA.." width="760" height="4400" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
    The ReaLBlog page (http://virtualfieldwork.org/ReaLBlog.html) has this:
    <iframe src=http://realearthsystemscience.blogspot.com/
    style="width:1000px; height:1500px;
    border-width:0px;
    border-color:#990033; 
    border-style:solid;"
    scrolling="auto" >
    </iframe> 
    There are also Facebook and Stumble Upon buttons that aren't working/appearing.
    After perusing the related posts, I was hoping Old Toad would reply.
    Thanks!
    Don

  • How to send an html snippet with swf flash under other layers in iWeb?

    I like designing websites on iweb but face problems regarding flash.
    When i embedd a swf in an HTML snippet...the snippet automatically postions itself at the topmost layer. Even if you send it behind lets say a box or any shape, or a link ..on publishing it , it comes right back up when seen on other browsers like firefox or chrome. But strangely on my mac browser - safari- it works just fine.
    Links in a flash swf banner when placed in iWeb (inside an html snippet ) opens other linked pages within the frame of the html snippet itself...and not as a seperate page.
    I'm not a programmer so i wouldnt understand complicated stuff... but i knw how to copy paste codes inside a snippet and edit the sizes.
    I need help fast?
    Thanks in Advance!!
    Anshuman

    When i embedd a swf in an HTML snippet...the snippet automatically postions itself at the topmost layer. Even if you send it behind lets say a box or any shape, or a link ..on publishing it , it comes right back up when seen on other browsers like firefox or chrome. But strangely on my mac browser - safari- it works just fine.
    That's how browsers behave.
    Links in a flash swf banner when placed in iWeb (inside an html snippet ) opens other linked pages within the frame of the html snippet itself...and not as a seperate page.
    Use the target attribute : target="_top" or target="_blank" in the <a href> element.
    I'm not a programmer so i wouldnt understand complicated stuff... but i knw how to copy paste codes inside a snippet and edit the sizes.
    Pasting custom code in a HTML Snippet and make it work is your responsibility. And if you're not a programmer, start learning and become one. Before you know you're the resident technology expert in this forum.

Maybe you are looking for

  • Setting up Free Goods in CRM 5.0 Standalone

    Dear Friends, We are trying to set up Free Goods in our CRM 5.0 standalone environment. What we want to realize is that, if customer buys product A, product B will be added to the order automatically as free of charge. So far we have no idea how to g

  • Ipod Video With Windows

    Anyone know of a free program that can put dvd's onto my ipod...PLease help me im lost here..I've seen handbrake but is that only for macs?

  • Hyperion 9.3.1 - Workspace - HFM screen is blank and no option from toolbar

    We have a user that, all of a sudden, gets a blank screen when they log on to HFM via workspace. She's able to see everything in Explore and Planning, just not HFM. Also, she is able to retrieve the data through Smartview so it's not a security issue

  • Logitech z906 5.1 surround sound and iMac 27 inch-how do i set up and get surround sound?

    I just purchased logitech z906 surround sound 5.1 speakers and also have the new imac 27 inch fully loaded. My only concern prior to receiving my speakers, will I be able to hook it up with my computer? Do i need any extra external HDMI cables or wha

  • DoubleClick List Item with Icon (is this a bug)

    DoubleClick event is not called when you double click an Icon displayed in a list ! Help ! is this a bug or me being thick ?? Demo App Below (just supply your own Icon.) <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx=" http://www.ado