raddy
Man On The Street
Posts: 248
|
Post by raddy on Oct 8, 2009 17:39:13 GMT -5
Ok..... After several hours of wanting to curb stomp Google Web Toolkit developers, I found a solution to a problem. Well, a workaround... Background, Google Web Toolkit.. You write it in Java (event driven like Swing) with a Java servlet backend for RPC calls to get database or whatever else. That Java for GWT is compiled into Javascript. Makes AJAX / Javascript writing painless (well almost). If you are going to use TinyMCE (Very cool RTF editor btw) with GWT, use this wrapper class in your Java: consult.goannatravel.com/blog/2007/11/22/gwt-tinymce-widget/Was grabbing text out of the database to pre-load the textarea, but when I modified the textarea, nothing happened in Firefox when I called tinyMCE.getText()!!! Worked in IE just fine. So anyways, I grabbed the wrapper class, deleted the TinyMCE configuration, and added the javascript on that page up yonder to the HTML page and VOILA! code.google.com/webtoolkit/tinymce.moxiecode.com/
|
|
|
Post by dolphie on Oct 8, 2009 18:25:51 GMT -5
Ok..... After several hours of wanting to curb stomp Google Web Toolkit developers, I found a solution to a problem. Well, a workaround... Background, Google Web Toolkit.. You write it in Java (event driven like Swing) with a Java servlet backend for RPC calls to get database or whatever else. That Java for GWT is compiled into Javascript. Makes AJAX / Javascript writing painless (well almost). If you are going to use TinyMCE (Very cool RTF editor btw) with GWT, use this wrapper class in your Java: consult.goannatravel.com/blog/2007/11/22/gwt-tinymce-widget/Was grabbing text out of the database to pre-load the textarea, but when I modified the textarea, nothing happened in Firefox when I called tinyMCE.getText()!!! Worked in IE just fine. So anyways, I grabbed the wrapper class, deleted the TinyMCE configuration, and added the javascript on that page up yonder to the HTML page and VOILA! code.google.com/webtoolkit/tinymce.moxiecode.com/Thank you, radster! Good info.
|
|
|
Post by Turk on Oct 14, 2009 12:53:17 GMT -5
Raddy,
Can you write a java script snippet that on mouse over there would be a drop down?
|
|
raddy
Man On The Street
Posts: 248
|
Post by raddy on Oct 15, 2009 8:18:54 GMT -5
Not off the top of my head, but I could google around, I'm not a JS programmer In GWT it would be something like this, I don't have time at the moment to make a good example, gotta go to work! edit: resize image
|
|
|
Post by Turk on Oct 15, 2009 21:02:37 GMT -5
raddy
I had to resize your image.
What I was thinking. A drop down that would be populated from a two dimensional array. The first element would be the selection the second element would be the action. like a label launching a url with _blank attribute.
If you don't know java script don't knock yourself out, I can write it it just takes me many hours longer than most folks. by the time i'm finished i'll have forgotten where i started.
|
|
raddy
Man On The Street
Posts: 248
|
Post by raddy on Oct 15, 2009 21:39:46 GMT -5
Or you can do something like this:
var menuItem = { var x:"Some Website", //This would be maybe the string in the menu var y:"http://...." //This would be the action };
Then you can make an array of "menuItem".
var menuArr = new Array(); menuArr[0] = { var x:"Sexy Rommie Picks",var y:"http://rommie.com"}; menuArr[1] = { var x:"Turk",var y:"http://www.turkishot.com"};
Then, however you make a menu in JS.
for (var i=0; i<menuArr.size();i++) { document.write( .... menuArr.x ..... menuArr.y ); }
|
|
raddy
Man On The Street
Posts: 248
|
Post by raddy on Oct 15, 2009 21:47:47 GMT -5
Yes, you can do what you were thinking....
menuArr[0][0] = "Text 1"; menuArr[0][1] = "Link 2"; menuArr[1][0] = "Text 2"; menuArr[1][1] = "Link 3"; ... menuArr[n][0] = "Test n"; menuArr[n][1] = "Link n";
|
|
|
Post by Turk on Oct 15, 2009 22:15:34 GMT -5
Got it - you saved a few hours. I'll put it together with a populated array and post again then you can help me get the code organized. Thanks dude
|
|
|
Post by Turk on Oct 15, 2009 22:16:57 GMT -5
p.s. "Sexy Rommie Picks" sounds like a great menu item
|
|
|
Post by Turk on Oct 16, 2009 0:55:26 GMT -5
For large images you can resize the [img] tag to look like [img width=800 height=600]
|
|
|
Post by Turk on Oct 16, 2009 1:02:30 GMT -5
Here's the HTML I wrote for the table on the home page, I want to get rid of the table and replace with a drop down. I'll work on the code and post when done. Notice target="_blank"
<!--begin SD scene links menu-->
<table border="1" width="90%" align="center" valign="center" cellspacing="0" cellpadding="5"> <caption class="titlebg"> <font size=2>San Diego Scene Links</font> </caption> <tr> <td class="windowbg" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://www.760kfmb.com/" target="_blank">760 KFMB</A></li></font></font> </td> <td class="windowbg2" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://www.signonsandiego.com/" target="_blank">SignOn San Diego</A></li></font></font> </td> <td class="windowbg2" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://realclearpolitics.com/" target="_blank">Real Clear Politics</A></li></font></font> </td> <td class="windowbg" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://www.drudge.com/" target="_blank">Drudge Report</A></li></font></font> </td> <td class="windowbg" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://www.foxnews.com/" target="_blank">Fox News</A> </li></font></font> </td> <td class="windowbg" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://english.aljazeera.net/" target="_blank">Al Jazeera</A> </li></font></font> </td> <td class="windowbg" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://dailykos.org/" target="_blank">Daily Kos</A> </li></font></font> </td> <td class="windowbg2" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://www.democraticunderground.com/" target="_blank">Dem Underground</A></li></font></font> </td> <td class="windowbg2" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://www.huffingtonpost.com/" target="_blank">Huffington Post</A></li></font></font> </td> <tr> <td class="windowbg2" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://www.heritage.org/" target="_blank">Heritage Foundation</A></li></font></font> </td> <td class="windowbg2" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://townhall.com/" target="_blank">Town Hall</A> </li></font></font> </td> <td class="windowbg" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://motherjones.com/" target="_blank">Mother Jones</A> </li></font></font> </td> <td class="windowbg" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://wnd.com/" target="_blank">World Net Daily</A> </li></font></font> </td> <td class="windowbg2" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://www.rushlimbaugh.com/home/today.guest.html" target="_blank">Rush Limbaugh</A></li></font></font> </td> <td class="windowbg" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://chargers.com/" target="_blank">San Diego Chargers</A></li></font></font> </td> <td class="windowbg" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://sandiego.padres.mlb.com/index.jsp?c_id=sd" target="_blank">San Diego Padres</A></li></font></font> </td> <td class="windowbg2" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://goaztecs.cstv.com/" target="_blank">SDSU Aztecs</A></li></font></font> </td> <td class="windowbg2" align="left"> <font size="2" color=#4080B0 class="cattext"> <font size=1><li><A HREF="http://usdtoreros.cstv.com/" target="_blank">USD Toreros</A></li></font></font> </td> </tr> </table>
<!--end SD scene links menu-->
|
|
raddy
Man On The Street
Posts: 248
|
Post by raddy on Oct 16, 2009 7:44:18 GMT -5
Cools
|
|
|
Post by Turk on Oct 17, 2009 22:50:52 GMT -5
I finished my java script drop down today and amazingly it actually works. i should have time Sunday I'll post the code and the drop down.
I could not get the two dimensional array to work in a for/next loop so I made a form with an embedded function call
|
|
|
Post by Turk on Oct 17, 2009 22:51:21 GMT -5
p.s. hot avatar
|
|
raddy
Man On The Street
Posts: 248
|
Post by raddy on Oct 18, 2009 16:12:52 GMT -5
=D
|
|