Jump to content

Err

Members
  • Posts

    1,009
  • Joined

  • Last visited

Posts posted by Err

  1. We're talking about e-mail signatures right? I don't think it really matters if it's for a signature, I mean no one is going to check your code to make sure it validates or anything like that... (at least from my experience) so do what you think will work better for you. Though I personally would reduce the code to make it a little more understandable. Also it seems to me that you're not really using the table (based on your code). Can you work without it?

    <p style="color:black; font-family:Arial, sans-serif; font-size:12px;">NAME, TITLE</p><p style="color:black; font-family:Arial; font-size:12px;">Iverson Language Associates, Inc. A Future 50 Company</p><p style="font-family:Arial, sans-serif; font-size: 12px; font-weight:bold; font-style:italic;">Managing Document Translation</p><p>Celebrating 20 Successful Years in Business: 1986-2006<br />P.O. Box 511759</p>

    Maybe?

  2. Hmm... it looks like the image is causing that vertical scroll bar to appear in IE (Why only IE...? I don't know). You can always try to make your banner a background-image so matter what resolution a user may have it will always fit.

  3. Awesome. That worked VERY good. Thank you so much. (err... what do you mean you tested it on my web page? O_o?)I also wanted to ask if you know how to put 2 of those scripts together. Adding them together like the below example renders the javascript useless. It so far only works if they're in there own separate <script> tags.

    <script type="text/javascript"><!--elements = document.getElementsByTagName("p");for(i=0;i<=elements.length;i++) {  if (elements[i].className == 'a') {	elements[i].style.display = 'block';  }}elements = document.getElementsByTagName("div");for(i=0;i<=elements.length;i++) {  if (elements[i].className == 'b') {	elements[i].style.display = 'none';  }}// --></script>

    Please take a look at my web page again to see what I'm talking about. You can toggle your js on or off then refresh the page to see the result.[removed]

  4. Because I'm very short in time, I'll get right to the problem:I can't get this java script:

    <script type="text/javascript"><!--elements = document.getElementsByTagName("p"); if (elements.className == 'test') {  document.style.display = 'block';}// --></script>

    to "block" this content:

    <p class="test">Lorem ipsum dolor sit amet, consectetuer adipiscing elit,  sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam  erat volutpat.</p>

    with this CSS:

    <style type="text/css">.test {  display: none;}</style>

    The css display is set to none for the class ".test", but I'm trying to call the javascript to block that class thus the content is only seen when javascript is enabled. I do not want to use id's I know it works, I'm just trying to call a bunch of classes with that javascript. I edit that javascript myself, but it doesn't work.Here is a test page of what I'm talking about:[removed]You have to look at the source to see that some content is actually not displayed because of the style I have on it, but it should be blocked anyways becuase of the javascript I have on there... or so I thought, what am I doing wrong? and is there a work around for what I'm trying to do? Thank you very much for any help on this.

  5. I'm on broadband also, plus I can adblock any images/advertisements I want to speed up my loading time. (Yes, including the ad on the top of this forum :))IE = Internet Explorer orMSIE = Mircosoft Internet Explorer

  6. Your content (images, characters) will force your height to expand even if it's set to a fixed height. I do believe that's different if you have your div to display: block; or floating (I'm not totally sure) which in that case your div will stay the same height and your content will "magically" go over the div, giving it a terrible look. overflow just adds scrollable content in a fixed sized div. More about it here:http://www.w3schools.com/css/pr_pos_overflow.asp

  7. Taken from your other topic:

    I am trying to update a signature for my company and I am having some trouble.<table border="0" cellpadding="0" width="98%"><tr><td><p style="color: black; font-family: 'Arial', sansserif; font-size: 12px">NAME, TITLE</td></tr><tr><td> </td></tr><tr><td><p style="color: black; font-family: 'Arial'; font-size: 12px">Iverson Language Associates, Inc. A Future 50 Company</td></tr><tr><td><p style="font-family: 'Arial', sanserif; font-size: 12px; font-weight:bold; font-style:italic;">Managing Document Translation</td></tr><tr><td> </td></tr><tr><td>Celebrating 20 Successful Years in Business: 1986-2006</td></tr><tr><td> </td></tr><tr><td>P.O. Box 511759</td>I am using Inline Styles. I would like to italicize and embolden the "Managing Document Translation" Portion. I can't seem to do it right. How would I also modify hyperlinks? Any suggestions would be great! Thanks!
    I added the bold and italic you wanted, but please take some time to take a look at these links for future reference:http://www.w3schools.com/css/pr_font_font-style.asp (italize)http://www.w3schools.com/css/pr_font_weight.asp (bold)http://www.w3schools.com/css/css_pseudo_classes.asp (hyper-links)To modify in-line hyper links would be something like:<a href="#" style="color:red; text-decoration:none;">Your Text</a>But you can only do so much with an in-line style link.:)
  8. Thanks for correcting the script mistake choco, however it's still not working. I'm using Firefox and even with your updated script it's still not fully functional. You can look for yourself here:[removed] (Updated sizes)I noticed that if I change around the ">" to "<" on the if (scrnH>1200) {scrnH=800;scrnW=800} part of the code, the pop-up size changes to that of the highest resolution size and vise-versa. That however DOES NOT fix the problem. :)I have a script on the actual pop-up now to tell me and you how big the pop-up window is (it's not exact, but it helps) and what resolution you are currently using for testing purposes, but this script only works correctly in Firefox (please note that). Thanks again for all of y'alls input. :)

  9. Thanks scott. I see the scrnH>1200 "if" statements and that way will work also, however the problem that I'm having with that script is that only the else {scrnH=350;scrnW=200} part of the script is working, it's completely ignoring the other parts of the script regardless of the screen resolution I have on at the time. Perhaps I messed something up. Can you tell me what went wrong?Here's the code I have now:

    function popitup(url){	newwindow=window.open(url,'name','height='+scrnH+', width='+scrnW+', scrollbars=yes, status=yes, location=no, resize=yes, toolbar=no, directories=no, menubar=no, status=no left=5, top=5');	if (window.focus) {newwindow.focus()}	return false;}scrnH=screen.height;scrnW=screen.width;if (scrnH>1200) {  scrnH=800;scrnW=800}else if ((scrnH>1000) && (scrnH<1200)) {  scrnH=800;scrnW=450}else {  scrnH=350;scrnW=550}

    I changed the scrnH and the scrnW a bit because I was testing out the script. Also please note that I have this script in an external .js file.Many thanks for the help. :)

  10. @Chocolate570:Well, that script actually makes the pop-up window the exact size of the users resolution. I wanted one that is a fixed height and width for specific resolutions upon them executing the pop-up, but only for more resolutions. The above code I have has a pop-up size (width and height) that is perfect for my resolution, but not so great for others. :)@jesh:That's not really what I wanted. But thanks.I can better illustrate what I want to do by this image:[removed]Hopefully that helps. :)

  11. Howdy. I'm looking for way I can add a user executed pop-up to adjust on whatever the screen resolution of the user is. So lets say, me, I have a screen resolution of 1280 x 800, I want a pop-up to change window sizes based on my screen resolution for that specific resolution only. Now I have the pop-up script, I just don't know how I can add the screen.width and screen.height on to the below pop-up script to do that. My best guess would be with the "if" and "else" statements... I just need help on that. I want to do this because on some resolutions, the pop-up window size I have now is a bigger size on a lower resolution, then that of a higher resolution. I just want to eliminate that problem.pop-up script:

    <script type="text/javascript">function popitup(url){	newwindow=window.open(url,'name','height=500, width=650, scrollbars=yes, status=yes, location=no, resize=yes, toolbar=no, directories=no, menubar=no, status=no left=5, top=5');	if (window.focus) {newwindow.focus()}	return false;}</script>

    It would work better if I had all the pop-up attributes (e.g. "scrollbars=yes, toolbar=no, etc") in each specific resolution containers. If someone could just get me started, I can add the rest of the resolution sizes myself. Thanks.

  12. I checked it with Opera, Mozilla Firefox, and IE. Everything seems okay.

    Tested with IE7 and FF1.5.0.6. I don't even want to try Opera, as I've waited enoguh for this image to load on those two browsers already.
    lol, what are you on? dail-up? It took about 2 seconds to load (on high-speed cable) for me. :)
  13. I've commonly seen "cgi-bin" in url's, and today I was looking around and I finally got curious enough to look it up when I saw it in of my folders in my site... google searching it turned up few worthless results, so I thought I'll ask here. What the heck is it?

  14. Hi folks.Long story short, I'm trying to edit a script with very little javascript knowledge, and I have no clue what I'm doing wrong (or just doing for that matter) perhaps you good JS folks can help me. :)Script:

    <script type="text/javascript">    var BrowserDetect = {	init: function () {		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";		this.version = this.searchVersion(navigator.userAgent)			|| this.searchVersion(navigator.appVersion)			|| "an unknown version";		this.OS = this.searchString(this.dataOS) || "an unknown OS";	},	searchString: function (data) {		for (var i=0;i<data.length;i++)	{			var dataString = data[i].string;			var dataProp = data[i].prop;			this.versionSearchString = data[i].versionSearch || data[i].identity;			if (dataString) {				if (dataString.indexOf(data[i].subString) != -1)					return data[i].identity;			}			else if (dataProp)				return data[i].identity;		}	},	searchVersion: function (dataString) {		var index = dataString.indexOf(this.versionSearchString);		if (index == -1) return;		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));	},	dataBrowser: [		{			string: navigator.vendor,			subString: "Apple",			identity: "Safari"		},		{			prop: window.opera,			identity: "Opera"		},		{			string: navigator.vendor,			subString: "iCab",			identity: "iCab"		},		{			string: navigator.vendor,			subString: "KDE",			identity: "Konqueror"		},		{			string: navigator.userAgent,			subString: "Firefox",			identity: "Firefox"		},		{	// for newer Netscapes (6+)			string: navigator.userAgent,			subString: "Netscape",			identity: "Netscape"		},		{			string: navigator.userAgent,			subString: "MSIE",			identity: "Explorer",			versionSearch: "MSIE"		},		{			string: navigator.userAgent,			subString: "Gecko",			identity: "Mozilla",			versionSearch: "rv"		},		{ 	// for older Netscapes (4-)			string: navigator.userAgent,			subString: "Mozilla",			identity: "Netscape",			versionSearch: "Mozilla"		}	],	dataOS : [		{			string: navigator.platform,			subString: "Win",			identity: "Windows"		},		{			string: navigator.platform,			subString: "Mac",			identity: "Mac"		},		{			string: navigator.platform,			subString: "Linux",			identity: "Linux"		}	]};BrowserDetect.init();</script><script type="text/javascript">  document.write('<span style="color:blue;">' + BrowserDetect.browser + ' ' + BrowserDetect.version + ' / ' + BrowserDetect.OS + '</span>');</script>

    The above code has 2 scripts, one to detect the browser/operting system (The long script) and another (short script near the bottom) to display the what the long script detected. My problem lies with the 2nd small script; I want to get rid of it and instead have an html tag in it's place like <span id="browser_os"></span>, I just want to simply elimiate the second script and use regular html tags in it's place; so then my next step was to edit the first script so I can add something that I can achieve that with. I came up with innerHTML for a solution, but I have no idea how I can implement it into this script. I have tried to do this by myself, but this is out of my league. Can one of you folks at least guide me into the right direction? If I had not made myself clear, please tell me so I can explain it in a more understanding way.

×
×
  • Create New...