adding the src in iframe tags. the problem to resolve looks like this:
<script type="text/javascript">
/*
Display the daily schedule in an inline frame.
Daily schedules are stored in the files
sunday.htm through saturday.htm.
*/
document.write("<iframe src ='weekday.htm'></iframe>")
</script>
Instructions say where weekday is the text string returned by the weekDay() function. I do have weekDay() function but I don't know how to include it into the iframe.
I am using this script which is nearly working correctly, but not quite!
When a user selects some text from the web-page and copies it,the script is supposed to pick up the current web-page url and create a resource box or credit line that is added to the selected text when the data is pasted.
You will see that the meta keywords are used (randomly) as the anchor text and this should be wrapped with the href= tags in order to create a link. Thats the bit that is not workink, but I can not see why.
Here is the complete script.
function init(){ // Options: var useMetaKeyword = true; // Otherwise, page title var minLength = 40; // Min selection chars
I have wrote some jQuery thats adds a class to any <a> tag that contains an external link. That way an icon can be applied to the <a> using CSS!
Code JavaScript: $("#contentPg > p > a[href^='http://']").addClass('icon').addClass('wwwDoc').attr('rel','external');
However, I want to try and modify this script so that it only adds the class if the <a> tag is directly after a <p>, however I am not sure how to achieve this? The reason I wish to achieve this is so that Icons are not applied when the link is in the middle of a line of text, but only when the link is on a line of its own!
When trying to emulate php's nl2br() function in javascript, I ran into something quite disturbing.
Code: cms.t.value = cms.t.value.replace(/ /gi, '<br /> '); Using this piece of code, I was really surprised that the newlines weren't preceded by <br />, but by <br>. I really don't understand why that would happen. Why can't I decide my own replacement string? .
I'd like to know how to add break tags "<br>" inbetween entry's in an input form, an example is if the word "yada yada" was entered you would wind up with y<br>a<br>d<br>a<br> y<br>a<br>d<br>a
I would like to able to add the break tags with a button onClick. I have no idea where to start ...
How can I use jQuery to add a css class to the first level of <li> tags under a <ul> tag? I have this so far: $("ul.menu li:first").addClass("myClass"); But this only adds the "myClass" to the first <li>, I'd like the set of <li> tags directly underneath to have the same css class. I have a menu structure and it's only the first set of <li> tags I'm interested in.
I created an aweber pop-over opt-in form and inserted the <script>...</script> code aweber generated.
The site looks fine in Firefox, but it seems that adding this little bit of code messes up the CSS of my site in IE8. Does anyone know what's going on or how to fix this?
I am putting the finishing touches to a custom written (pHp) article editor to allow users to publish content on a website.I have basically finished the project, and I am putting the finishing touches in with jquery widgets, such as a word counter. I would also like people to be able to highlight a section of text, then have some custom tags wrap the text (much like on this forum when you highlight a word in the message box and hit the wrap button).I would like my own custom tags to be used, such as <span class='someclass'>some entered text</span> rather than predefined ones.
I'm currently working with a bit of javascript to dynamically add <option>s into a select box. My code currently works fine in Internet Explorer, however in Firefox the dropdown only displays the first option in the list, and when clicked the other values aren't displayed.
Here is the code;
//ar_options is an array with the option to be displayed in.
for (count=0; count<number_of_options+1; count++) { document.forms['enquiry'].enquirytype.options[count] = new Option(ar_options[count],ar_options[count]); };
As I said - fine in Internet Explorer, but not in Firefox. I did discover some discussions about this, which were talking about an issue and workarounds but I couldn't get any of them to work. I have also tried simply using the document.write() function to output the HTML in the correct place. However this is just hte same, works in IE but not Firefox.
Here's what I'm trying to do: 1) I get reference to a div that's on my page: var theDiv = $("#" + divID); 2) Now I want to add a custom attribute tag to it, so for instance I want to add "winWidth" so that the div object now contains "winWidth=" for instance. 3) I want to set winWidth now since it's part of theDiv to a value
I'm not sure how to really do 1 + 2. I need to do this on the fly because some javascript logic later will add these attributes dynamically to the div... outside of what the original div had...I don't care what it had, I know I have it now in a JS variable and now I want to both add some new attributes to the div, and then set them on the fly. I don't need these attributes to be on my page, I just need them added to my div variable reference.
I am a newbie to jquery i want to count some tags inside a <iframe>.The iframe src is like this<iframe src="http://mysite.com/testing.php?id=7632762"></iframe>the php file included in the source contains several include files and more php kinda script finally a html output is generated.How to count the tags this generated html
I am creating a small CMS module for a client. I created a little form and when they click Submit, it goes straight out into an include (.inc) file, which is connected to the web page to be displayed.
The trouble I am having is that I'd like to create an additional button that will insert some text (certain html tags to make their life easier, etc) - I got it to work, actually. The script executes and the text is inserted - but once the script runs and the page refreshes (or whatever it does), the text then disappears. The only way I can seem to get it to stay put is when I use "onmouseup" instead of "onclick" - which means that every time the user accidentally mouses over the thing, it inserts the text.
I'm displaying 2 iframes on a page with content from other pages on the same domain. I'm using jQuery to apply a stylesheet to the 2 iframes by appending it to the head.
I have a page that opens up an iframe for the user to be able to select photos. Each photo has a checkbox, and on select I add a hidden form element to the parent frame form. This all seems to work fine, but im now stuck on how to remove the form element when the checkbox is un-checked.
Can't seem to make it work, I have seen many examples but they are all just for 1 div tag. When i trymore than one it doesn't work anymore.The first one works, if i have more than 1 then the other don't work.
using the following jquery $(document).ready(function(){ $("#toggle-text").click(function () { var divvalue= this.value;
Is it possible to trigger the action of a form with a submit button that's outside the form tags? If so, how should this example be rescripted to make the input tag work outside the form tags?
I really know nothing about how to code JavaScript (I know what it is and what it does) and I need a script to go in the head of my page and look for all <a> tags that have <img> tags inside of them and add a rel="lightbox" attribute to them.
I'm having a problem when I uncheck the box it should subtract the amount from the total which it does kind of. It subtracts a number other that one selected. When I put a alert into the function it pops up with the right amount.URL...click on "comps"uncheck the box under the zillow table.it should remove the amount of SqFt under the little table under the map.The only one that I've established is the zillow.[code]
I'd like to resize an iframe into which different (same domain) pages of differing heights are loaded. I can do a first-time resize no problem. It's the subsequent reloads that need to pass back their height to the parent page There seem to be lots of solutions for that around, but few I can see for resizing each time the iframe reloads. One is described here on another board [URL] but unfortunately the test page is no longer around (or indeed the site), so the full code is no longer available there. This one works, almost, for me: [URL] it does resize for me, but not quite sufficiently high each time - about 90% of what is required: [URL] Is there a way to add on sufficient extra margin that scrollbars no longer appear?
Is there a way to resize an iframe dynamically so that you never get the scroll bar and essentially hide that there is an iframe? Better integration really.Basically I want to iframe a forum into my site so that the design down the sides and top which my friend does using iweb are not messed with.We have a central area which can be longer or shorter depending on the forum.
I have a page A and inside it I have an iframe B. B points to another php file that shows a form (so basically in the iframe we see a form). When I submit the form, I call to another page C that verifies the fields of the form and if they are ok I redirect to page X, if not I redirect to page Y. The problem is that I see page X and Y inside the iframe, and I want to see them in the parent page.