Hi Folks,
I want a Font chooser pop up window which should be displayed when we click on particular HTML button and return me chosen font with all parameters.
Can anybody here please provide me a link where Can I get this?
Thanks & Regards,
Rahul.![]()
Hi Folks,
I want a Font chooser pop up window which should be displayed when we click on particular HTML button and return me chosen font with all parameters.
Can anybody here please provide me a link where Can I get this?
Thanks & Regards,
Rahul.![]()
You might find this code useful
HTML Code:<input type="button" value="Run Script" onclick="rangFunc()"> <div id="wrap"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin massa. Nam vehicula. Morbi velit nisi, mollis id, ultrices luctus, adipiscing sit amet, lectus. Nunc rhoncus nisl ac enim. Maecenas vestibulum dolor ut velit. Maecenas condimentum pulvinar purus. Pellentesque ac ipsum. Curabitur sodales, elit vel molestie hendrerit, elit odio rhoncus tellus, </div> <script type="text/javascript"> function rangFunc() { var color=prompt('What is your desired font color','black'); var size=prompt('What is your desired font size (pt)','12'); var type=prompt('What is your desired font family','Tahoma'); var style=prompt('How about your font style (Italic, Bold, Normal)','Normal'); var wrap=document.getElementById('wrap'); wrap.style.color=color; wrap.style.fontSize=size+'pt'; wrap.style.fontFamily=type; if(style.toLowerCase()=='italic') wrap.style.fontStyle='italic'; if(style.toLowerCase()=='normal') wrap.style.fontWeight='normal'; if(style.toLowerCase()=='bold') wrap.style.fontWeight='bold'; } </script>
Learn how to code at 02geek
The more you learn, the more you'll realize there's much more to learn
Ray.ph!
Hi Rangana
Thanks a lot...
Really thats help, but can you also provide site link where I can find such scripts ?
also I want to show some good UI window on click of button where I can choose font and color at the same time will be able to watch preview for it.
I'm going to start with this but any help in this will be really helpful.
Again thanks a lot.
Reagrds,
Rahul
That code came fresh from my mind basing on your requirement
You might find this link useful
http://www.ahfb2000.com/colors.html
Last edited by rangana; 05-16-2008 at 05:40 AM. Reason: Found a good link
Learn how to code at 02geek
The more you learn, the more you'll realize there's much more to learn
Ray.ph!
Bookmarks