Making A Pdf Out Of Javascript
Oct 23, 2007is it possible to create a pdf file using javascript language?
View 1 Repliesis it possible to create a pdf file using javascript language?
View 1 RepliesI'd like to make an HTTP request using JavaScript but not with the XMLHttpRequest object. I'm attempting to make this request to a different domain to get information and the security of modern browsers won't allow this with the XMLHttpRequest object.
Is there another way to do this in JavaScript? Oh and I'm not taking advantage of the asynchronous nature that object either, so that's not a criteria for a potential solution.
I have some code to pick a wire size and conduit size from 2 separate drop down list. Then inside the js it is evaluated to decide how many wires. My problem is I can't figure out how to make the drop down options go into the JS. I just put in an error alert to test if they were for now.
Here is my code:
function fillcap(){
var wire = document.getElementById("wireSize");
var conduit = document.getElementById("conduitSize");
if (wire.option.length >= 10 && conduit.option.length == .5) {
windows.alert("Wire Size exceeds conduit max fill!")
}
And the html
<h2>Fill Capacity</h2><br>
<b>Wire Size</b><br>
<select id ="wireSize">
<option value="1">#14</option>
<option value="2">#12</option>
<option value="3">#10</option>
<option value="4">#8</option>
<option value="5">#6</option>
<option value="6">#4</option>
<option value="7">#3</option>
<option value="8">#2</option>
<option value="9">#1</option>
<option value="10">1/0</option>
<option value="20">2/0</option>
<option value="30">3/0</option>
<option value="40">4/0</option>
<option value="250">250</option>
<option value="300">300</option>
<option value="350">350</option>
<option value="400">400</option>
<option value="500">500</option>
<option value="600">600</option>
<option value="700">700</option>
<option value="750">750</option>
</select> <br>
<b>Conduit Size</b><br>
<select id="conduitSize">
<option value=".5">1/2</option>
<option value=".75">3/4</option>
<option value="1">1</option>
<option value="1.25">1-1/4</option>
<option value="1.5">1-1/2</option>
<option value="2">2</option>
<option value="2.5">2-1/2</option>
<option value="3">3</option>
<option value="3.5">3-1/2</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select><br>
<input value="Wires allowed" onclick="fillcap()" type="button">
<input type="text" name="myresultbox" id="resultbox10"> Wires<br>
Thank you for any advice.
I want to try and make a menu using javascript and DHTML. I want the
menu to be horizontaly placed on top of the webpage. When I move the
cursor over it a popup menu comes up. Sort of like what you can find
on the first page of Micrsoft.com near the top. But I want the menu to
have a more transparent blue color. Is that possible? Also where would
I go to find out how to do this?
I have a client who wants a gallery of images to pop up on her enter page similar to this site, http://bit.ly/mUscmo . It won't be identical, but she likes the way the images all pop up and then just stay there.I know how to function JavaScript, but I don't know how to write it from scratch. Is there any where I could find a code that does something similar to this?
View 11 Replies View RelatedI know how to make it so you click on a picture and a pop-up window appears with a picture inside. But i dont know how to put multiple pictures that are pop-ups...
View 1 Replies View Relatedhow to make a form to show up on a html page from the site today but I'm still really confused by something
1. I was making a form to have ppl enter their info then it will e-mail the info to me, but I don't know what to do to make the data send to an e-mail address.
2 I don't know how to write the script so it will tell ppl "your form have been sent" if all the info did sent to my e-mail.
i am working on a page which direct users who come on website to index.php which i created in a new pop up window. i was checking that if someone (stupidly) refresh the url of my web from where he is redirected to the index.php ,it re run the funtion and another pop up is created. is there anyway i can add validation kind of thing that if pop up is created it alert the user that web page already opened. can i able to do that?
View 2 Replies View RelatedThere are a lot of extremely smart members here, so I thought if the knowledge is out there, this would be the place to tap into it. I have included the code below that I am working with. What I want is for a person to enter their name and room number and coffee preference. Then a cookie will store that information and tell them a cup will be sent to them at their room. When the page is loaded again their preference will be remembered and they will be offered a discount for their favorite coffee. This is part of a self taught book I am studying.
Most of it works, but I think the selection of coffee from the radio button is not being stored in the cookie, or at least I can not recall it. I was also wondering if there was some way that I could combine the makeCookie and welcome functions so that there would only be one button to click on the page. Code:
I am not sure this belongs in the JavaScript section so apologies if it doesn't.
I want to be able to open a link in a new window, but make sure the users are not able to modify the URL.
Is that possible?
I'm having difficulty making a list (both drop down and radio button) read
only; I am successful when I attempt to make a text field read only. Any
suggestions on what java script I use to accomplish this?
I am trying to write a regex that will parse BBcode into HTML using
JavaScript. Everything was going smoothly using the string class
replace() operator with regex's until I got to the list tag.
Implementing the list tag itself was fairly easy. What was not was
trying to handle the list items. For some reason, in BBcode, they
didn't bother defining an end tag for a list item. I guess that they
designed it with bad old HTML 3.2 in mind where you could make a list
by using:
<ul>
<li>item 1
<li>item2
</ul>
However, I need to make this XHTML compliant, so I needed to add the
</li> tag into the mix. Unfortunately, the only way to find where to
put it is to find the next[*] (<li>) tag or an open list (in the case
of nested lists) or close list tag. I was trying to get a rule that
handles the list items to work, but it only matches the first item in
any list. Here is the line of code:
bbcode =
bbcode.replace(/[list(=1|=a|)](.*?)[*](.*?)([*]|[list]|[/list])/g,
'[list$1]$2<li>$3</li>$4');
First, I check to make sure that the list item is inside a list. Then,
I match the[*] tag to find the start of the item, then I match either
the next[*],, orto determine the end of the item.
This successfully prevents a list item outside of a list from being
made into a <li> element, but only matches the first list item in a
list. Is there any way to make this match all occurances of this
pattern without looping over the statement until the pattern can no
longer be found?
I have a graphic with a rollover for site navigation on each page. I
put the page to go back to in the rollover javascript.
My question is, is it possible to put in some code that will refer the
visitor back to whatever page they came from rather than one I
specify?
The rollover is combined with a tooltip script to make matters fun
(below). However, I'm quite happy to lose the tooltip to have the link
perform as a back button.
<a href="../index.asp"
onmouseover="document.images['link1'].src=img2.src;
showtip(this,event,'Back to home page');"
onmouseout="document.images['link1'].src=img1.src; hidetip()";><img
src="bhome.gif" name="link1" border=0></a>
I don't know if this will work, but I'm trying to put a google map on my website and in IE, the div containing the map needs to have a width value in pixels in order for the API to center the map properly. want a div with 100% width, which is inside another expanding column. This works everywhere but IE. My question is, Is there a way, using jQuery, to get the div to discover its inherent width and then apply that in pixels, as an inline style, to that tag? It would also have to redefine its width when the window resizes.
View 2 Replies View RelatedI am trying to build a calendar that has clickable dates that reveal a pop up box with the event of the day when you click on them.I have got some basic functionality at the moment with the pop up working on one date,making it work on multiple dates.at the moment I have the pop up box positioned relative and and am using the toggle function to switch the display form none to block.I need to work out how to position the pop up box no matter which date you click on?here is the mark up for part of the table:
<tr>
<td>21</td>
<td>22</td>
[code]....
I am trying to get a dialog box to open another dialog box. Clicking on "more search options" the first time results in opening a dialog box. Clicking "search" within the dialog box results in opening up a second dialog box. But this only works the first time I click on "more search options". In other words, the second dialog box only opens up only once. To get the second dialog to open again, I have to reload the page in the browser. CSS and jquery code can be downloaded from [URL].
View 1 Replies View RelatedI have an image on which when user click I submit my form after doing basic javascript validation.I want user not to be able to click once they clicked on the image so that they don't submit it twice. Right now I disable the image once they click it.I was wondering is there any other way I can do that, is there any way to make image click able only once?
View 5 Replies View RelatedIs it possible to make an array lowercase at all? or can you only do this with a string?
View 5 Replies View RelatedI recently made my first ever ajax chat, and works given im a noob im quite happy about it :P How ever, sadly - its not smooth like some ajax chat's i've seen out there. And when i submit a message to teh chat the page refreshes.I was wondering if some one could help me by explaining how i can improve the efficientcy of it so it won't refresh and reacts alot quicker to create a live effect - This is what i got for my code:
<script type="text/JavaScript">
function sendMessage()
{[code]....
The PHP is chat.php loads the chat (a MYSQL query getting latest 20 chat messages and loops them out into the div)chatpost inserts the message to the table.
Im trying to write coding for entering a password into a prompt box, Ive got the prompt to work however I only want the password to work if 7 characters are entered, here is what I have:
var strPromptBox;
var strPasswordLength;
function validatePassword()
[code]....
I'll get it out their early, I am somewhat of a javascript novice.
Here is the code I am working with:
<script type="application/javascript">
$(document).ready(function() {
var numitems = $("#foo6 > li").length;
var secondstartpoint = numitems -3;
[Code]....
As you can probably see I am trying to set the start point of a jquery carousel to equal a variable that I have created. You can see I have tried " start: secondstartpoint", but this isn't working. I think possibly because the way the plugin is formatted so that the "start" option can only equal a number.
making a Drop down search box I have dropdown HTML code and also Search Box HTML code, I made sample code but not sure why its not working, please do the need full
<HTML><HEAD><SCRIPT type="text/javascript">
function searchSel() {
var input=document.getElementById('realtxt').value.toLowerCase();
[code]....
when I start typing in search box the name (like google), drop list box should also change and when clicked on GO should go to the following link
I'm about to give up with this one. I know this is possible in IE. In fact, I think this is the only thing IE does properly.Here is the working code for IE that should work in other browsers (Firefox,Chrome...) but doesn't.
document.body.onkeydown = function(event) {
e = event || window.event;
if(e.keyCode==13) {
[code]....
I have created a menuline with HTML and CSS and now I want to make it so that when you hover over the link in the list item it drops down revealing more options.Here's my HTML:
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN"
"http:www.w3.org/TR/xhtmli/DTD/xhtmli-strict.dtd">
<html xmlns="http:www.w3.org/1999/xhtml">
[code]....
I have the fade in of my image working, and would now like to have text appear after the fade in of the photo.
style portion:
.enhanced{
visibility:hidden;
}
javascript functions:
[Code]....
I was reading this tutorial on making a tabbed search box but I was confused as to how I was supposed to implement the actual code that does the searching. The tutorial is here http://woork.blogspot.com/2008/01/ta...g-css-and.html
View 1 Replies View Related