Jump to content

mikePhp

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Posts posted by mikePhp

  1. Is it working in IE7 now?

     

    That one bad single bit of text that was causing the charset invalidation problem is now gone.

     

    So now that that it is validating, IE7 will honor the non-anchor hover pseudo-element.

     

    Either way, that can now be confirmed or eliminated as the cause.

     

     

     

    Well this will have to be an elimination matey, hasn't made a difference. its ok for now as i have deleted the images that go into the overflow..

     

    Thanks for all your help

  2. Rite peeps,

     

    I have come across what can only be a STUPID bug in IE7 and CSS overflow property...

     

    I did a quick search to see if there was anything that related to what i am looking for but I couldn't find it.

     

    So here goes:

     

    I have 2 Divs one is nested inside the other...

     

    i.e:

    <div id="weblinks">
       <div class="infobox">CONTENT</div>
      <div class="infobox">CONTENT</div>
      <div class="infobox">CONTENT</div>
    </div>

     

     

    I have set my height to and absolute number 800px and my width aswell, I have set my overflow to auto aswell.

     

    What seems to be happening is when I view my website in either Firefox, Opera, Safari, both on MAC/WINDOWS the overflow works perfect, the images disappear as I scroll down, HOWEVER... view this in Internet Explorer 7 and it doesn't work at all, they are not staying within the  overflow sections, you scroll down and nothing moves except the heading you hover over the image and then they move but not in the overflow section just UP or DOWN,

     

    Heres the site (the images on the left of the website)

     

    http://www.planet-group.net/magazines/construction2

       

  3. It certainly isn't the only way, but why would you want to have more code for the user to download when you can write it inline? I don't know why it would be considered bad practice. What exactly are you trying to avoid doing?

     

    No No, it wasn't the fact if that,

     

    I have just always been taught to try an avoid inline coding in HTML, and always have a File which Holds most it not all of the Javascript, It also makes it easier to edit.

     

    N e ways i will dop what you have wrote for the time being until i manage to find out the way i am asking for..

     

    Thanks again lemmin

     

    Mike

  4. Try this:

    <a href="file.pdf" target="_blank" onclick="alert('Please be patient whilst loading');">PDF Link</a>
    

     

    thanks for that matey

     

    I know of that way and was going to put it in, but i find it abit tacky and bad practice/bad coding to write with in the HTML like that.

     

    or is this the only way?

     

    thanks again

     

    mike

  5. Hiya Guys,

     

    I have been making a TINY WEENY script to notify(alert) Clients that when the lick the link (which opens a PDF in the browser) to please be patient whilst the PDF loads on the browser.

     

    Here it is...?

     

    newWindow = {
    
    init:function() 
    {
    
    	if(!document.getElementsByTagName)
    	{
    		return;
    	}
    
    	var webLink = document.getElementsByTagName('a');
    
    	if(!webLink)
    	{
    		return;
    	}
    
    	for(var i=0; i<webLink.length; i++)
    	{
    		if(webLink[i].getAttribute('id').toLowerCase().match('alert'))
    		{
    			webLink[i].onclick = function()
    			{
    				alert('Please be patient whilst the PDF loads on your browser');
    				return true;
    			}
    		}
    	}
    }
    }

     

    Now my query is, When I Load this in IE 7, I have no Problems the PDF loads in the browser FINE,

     

    But when I check this in Safari (mac), Safari (win), Firefox(mac), Firefox (win), Opera(mac), Opera(win)

     

    I have no success, it Bypasses the script and just loads the PDF into the Browser..?

     

    If someone could help me with this that would be great,

     

    Also If you I could have help in getting it to open a new window and load the PDF into that so users can see that its actually loading, as Vista makes it look like nothing is.

     

    If i tried this, Would this work..?

     

    newWindow = {
    
    init:function() 
    {
    
    	if(!document.getElementsByTagName)
    	{
    		return;
    	}
    
    	var webLink = document.getElementsByTagName('a');
    
    	if(!webLink)
    	{
    		return;
    	}
    
    	for(var i=0; i<webLink.length; i++)
    	{
    		if(webLink[i].className.match('openUp'))
    		{
    			webLink[i].onclick = function()
    			{
    				window.open(this.getAttribute('href'),'newWindow');
    				return false;
    			}
    		}
    	}
    
    	for(var i=0; i<webLink.length; i++)
    	{
    		if(webLink[i].getAttribute('id').toLowerCase().match('alert'))
    		{
    			webLink[i].onclick = function()
    			{
    				alert('Please be patient whilst the PDF loads on your browser');
    				return false;
    				window.open(this.getAttribute('href'),'PDFVIEW');
    			}
    		}
    	}
    }
    }

     

     

    Thanks Again

     

    the link: http://www.planet-group.net/mediapack

     

  6. $query = "UPDATE base SET title = '$title', forename = '$forename', surname = '$surname', address = '$address', billing = '$billing', phone = '$phone', altphone = '$altphone', model = '$model', oem = '$oem', os = '$os', machineage = '$machineage', warranty = '$warranty', job = '$job'". "WHERE jobid = $jobid";

     

    Why are you separating the WHERE clause from the rest of the SQL and then attaching it again...? You have no need to to end the QUERY after your $job variable.

     

    Not sure if this is going to make a difference to why your having a fail response but try it like this NOTICE AT THE END ASWELL

     

    $query = "UPDATE base SET title = '$title', forename = '$forename', surname = '$surname', address = '$address', billing = '$billing', phone = '$phone', altphone = '$altphone', model = '$model', oem = '$oem', os = '$os', machineage = '$machineage', warranty = '$warranty', job = '$job' WHERE base.jobid = '$jobid'";

     

  7. Hmm...have you tried using innerHTML instead of creating a text node?  In other words:

    newElm.innerHTML = "<? echo $featureContent; ?>";

     

    Just tried that now Nightslyr, to no success i am afraid...

     

    If i look at the source of the HTML, it echo's the PHP, and displays it in the source, but doesnt change wen clicked..??

     

     

  8. I got it to work now matey, Nice one...

     

    I have another question now,

     

    No I have that workin i have now i have now been able to use node.replaceChild,

     

    And evething is working Great until i want to add the CONTENT to the new textarea,

     

    The new content is a PHP Variable recovered from my database, When i do this:

     

    	newElm.appendChild(document.createTextNode('<? echo $featureContent; ?>')); 

     

    Its like the all the HTML stops executing..

     

    I have also tried this

     

    	newElm.appendChild(document.createTextNode('\<? echo $featureContent; ?>\')); 

     

    Doesn't work..

     

    I will drop all my code in, but that part is the pecific part i am after, as the rest works TIP TOP.

     

    If n e one could help me with how to extract php in a JS would be grateful

     

       window.onload = function()
       {
    		var textTag = document.getElementsByTagName('textarea');
          var submitBtn = document.getElementById("convertHtml");
    
    
          submitBtn.onclick = function()
          {
    			var newTd = document.createElement('td')
    			var newElm = document.createElement('textarea');
    			newElm.setAttribute('name','htmlV');
    			newElm.setAttribute('wrap','virtual');
    			newElm.setAttribute('id','removed');
    			newElm.className='inputTextStyle';
    			newElm.appendChild(document.createTextNode(''));
    
    			newTd.appendChild(newElm);
    
    			for(i=0; i<textTag.length; i++)
    			{
    				if(textTag[i].getAttribute('name').toLowerCase() == 'elm1')
    				{
    					moveUp = textTag[i].parentNode;
    				}
    			}
    
    			moveUp.parentNode.replaceChild(newTd, moveUp);
          }
       }
    

  9. Hey, I just did a check: both versions work in IE7.  The id change doesn't show up in the source code, but it works.  You can see it in action here: http://www.nightslyr.com/elm1.html

     

    You'll notice that the textarea border changes from red to green when the button is clicked.

     

    How strange...??

     

    So why is it, when i am Copying the exact code you have i am Get EXPECTED OBJECT..?

     

    I will have another look

     

    Cheers Mate

  10. Yeah, it works in Firefox, but not IE (what else is knew?  :-\ ).

     

    Unfortunately, trying the direct approach (i.e., elm1.id = "idRemoved") isn't showing any changes to the source when I try it in IE, either.  Of course, given how IE works, it may actually be working with that behind the scenes, so try the direct version.

     

    Of cors, IE doesn't does IT , GRRRR , why be so awkward Microsoft

  11. Okay, try something like this:

    <script type="text/javascript">
       window.onload = function()
       {
          var submitBtn = document.getElementById("submitBtn");
          var elm1 = document.getElementById("elm1");
    
          submitBtn.onclick = function()
          {
             elm1.setAttribute("id", "idRemoved");
          }
       }
    </script>
    
    .
    .
    .
    
    <form name="Name" method="post" action="#">
    <textarea name="elm1" wrap="virtual" class="inputTextStyle" id="elm1"><?php echo $variable; ?></textarea>
    <input type="button" name="convert" id="submitBtn" />
    </form>

     

    Doesn't seem to work matey, I checked my code against yours , seems fine, Error Msg: expected object

     

     

     

  12. Can you show how you're invoking these functions (I'm presuming they're functions), and a sample of the HTML they're supposed to be operating on?

     

    Well I have a <textarea> tag with and ID in a form......

     

    <form name="Name" method="post" action="#">
    <textarea name="elm1" wrap="virtual" class="inputTextStyle" id="elm1"><?php echo $variable; ?></textarea>
    <input type="button" name="convert" id="submitBtn" onClick="convert2Html();" />
    </form>
    

     

     

    Thats how i call the functions, and also the JS is within the same page, i haven't given the JS its own page and then included it

     

    Hope you can help

  13. Hiya Guys,

     

    I wanted to remove and ID from a <textarea> tag but i am getting a error that the method is not supported.

     

    here is was i am putting..

     

    function convert2Html() 
    {
        var oldID = document.getElementById('elm1');
    
        if(!oldID) { return; }
    
        for(i=0; i<oldID.length; i++)
        {
           var newID = oldID[i].setAttribute('id','idRemoved');
        }
    }
    
    window.reload();

     

    I have also tried this way as well.

     

    function convert2Html()
    {
       var formTag = document.getElemenetsByTagName('textarea');
       
       if(!formTag) { return; }
    
       for(i=0; i<formTag.length; i++)
       {
         var idChange = formTag[i].getAttribute('id');
        
          if(idChange != 'elm1')
          {
             continue;
          }
          else
          {
            idChange.setAttribute('id','removeId');
           }
          }
    }

     

    None of them seem to work, could any one enlighten me, as to what the problem maybe.. Is it My code???

  14. It looks like you have characters that Microsoft Word or some program uses for apostrophes and double quotes.  They need to be replaced with plain text equivalents or html escape codes.

     

    Well what i am not getting is,

     

    I am dragging this from my wordpress Database, so this text is also displayed if you go to the News Link on the left nave bar, but it displays correctly in wordpress,

     

    I know wordpress does alot of filteration of text before either inserting to Db or displaying to screen...Wondering if any one could at all shed some light on this ..

     

    Cheers

     

     

  15. I am wanting to display some text from my Database on another page,

     

    I have NOW successfully created a connection and can display the text,

     

    But the text that is displaying has, little anomalies in it and won't display just as normal text like the rest on my index page.

     

    I have got strip_tags in-place to take the image way but how would i get it to display the text correctly

    wordpress

    Have a look at what i am on-about to get a better understanding..

     

    http://www.planet-group.net/magazines/foodanddrink/?page=home

     

    under the heading "ROD MILLINGTON"

     

     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.