473,320 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Javascript Prototype Background issue...

Hi everybody, Im a new user, my question is simple and dont really a pain in the ass, Im using prototype templeates for my project, the problem is when I tried to put an background-image throw this way, the background just dont show, and if you write it in the in-line way I mean style="background-image blalba" works fine... my code go something like this... If some one had the same problem or Issue bug etc... please post something... regards nahum...
Expand|Select|Wrap|Line Numbers
  1.     show:function()
  2.     {
  3.         var viewTemplate = library.templatesHash["template"];                
  4.         var ht = template2.evaluate( {viewTemplate:viewTemplate} );
  5.         workArea.update( ht );
  6.     }
  7.  
and my file.css is something like this...
Expand|Select|Wrap|Line Numbers
  1. td.td8{background-image:url(img/formas/img_background.gif); background-repeat:no-repeat; width:283px;border-right:1px solid #CCCCCC; border-bottom:1px solid #CCCCCC; vertical-align:top;}
  2.  
just for the record when put the same css in inline works fine....
Aug 16 '07 #1
4 2463
pbmods
5,821 Expert 4TB
Heya, Nahum. Welcome to TSDN!

When you run the show() function, what does ht evaluate to?
Aug 16 '07 #2
Heya, Nahum. Welcome to TSDN!

When you run the show() function, what does ht evaluate to?

Well actually what evaluate is the html file where I have define all my structure my form... is look like this...
Expand|Select|Wrap|Line Numbers
  1. <td> 
  2.    <div id="p1ViewDatosPago">#{html}</div>
  3. </td>
where #{html} will be replace for the source html or just the text I put in it... in this case Im evaluating a html source... and in this html exist a class name for example td1 where I writed this...
Expand|Select|Wrap|Line Numbers
  1. td.td10{vertical-align:top; width:268px; border-bottom:1px solid #CCCCCC; border-right:1px solid #CCCCCC;background-image:url(img/formas/img_background_facturacion.gif); background-repeat:no-repeat;}
but if I write something like this inside the file that has been evaluated...
Expand|Select|Wrap|Line Numbers
  1.               <td class="td10" style="background-image:url(img/formas/img_background_facturacion.gif); background-repeat:no-repeat;">
  2.                 <div id="p1ViewDatosFacturacion">&nbsp;</div></td>
  3.  
works!!!!! fine, but insteed I write something like this...
Expand|Select|Wrap|Line Numbers
  1.               <td class="td10">
  2.                 <div id="p1ViewDatosFacturacion">&nbsp;</div></td>
  3.  
where I declared the just the class the background dissapear... is somenthing strange I dont know exactly if is a kind a bug of prototype or is just me doing the thing wrong lol... thanx for the answer and the interest...
Aug 16 '07 #3
pbmods
5,821 Expert 4TB
Heya, Nahum.

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

If you already have a .css file, why not just implement it with a link tag?

E.g.,
Expand|Select|Wrap|Line Numbers
  1. <link rel="stylesheet" type="text/css" href="... /file.css" />
  2.  
Aug 16 '07 #4
ok.. I will do it the next time... Im actually Im working with the link tag... I think is a kind of bug in prototype I will post this issue in prototype bug report.. to see if is really a bug... anyway.. I really thanx for all this replies... and If some else know or have the same issue will be great to hear about it... :) If somebody in prototype answer me... I bring the answer here... thanks alot...
Aug 16 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: vinu | last post by:
I have a javascript file named select.js. This is a file which is use to pop up a calendar, when clicked on a calendar icon in an ASP file. have a close button in the calendar. When i click on the...
19
by: tnhoe | last post by:
Hi, any excel like grid javascript which is stable and fast to load thousand of rows data ? can it have F2 function to popup another window ? can validate cell value when cursor move away that...
3
by: Peter Williams | last post by:
Hi All, I want to write some javascript for a html page which does the following. Imagine that the page contains a table with 2 columns and 3 rows, e.g.: +---+---+ | A | B | +---+---+
41
by: Rene Nyffenegger | last post by:
Hello everyone. I am not fluent in JavaScript, so I might overlook the obvious. But in all other programming languages that I know and that have associative arrays, or hashes, the elements in...
7
by: Wm.M.Thompson | last post by:
For a computer programmer JavaScript is not difficult. It is pretty easy to look at some code for the first time and figure out what is going on. This is especially true if you have gratuated...
15
by: Phlip | last post by:
Javascripters: I have an outer page and an inner iframe. The outer page calculates some javascript, and wants the inner frame to run it. The inner frame should hit a page on the same (private)...
18
by: Tom Cole | last post by:
I'm working on a small Ajax request library to simplify some tasks that I will be taking on shortly. For the most part everything works fine, however I seem to have some issues when running two...
1
by: wkerplunk | last post by:
Below is what I have build with several different languages. It works great but I need help, I am stuck. When you click on an item in the dropdown autocomplete div it does a mousedown function...
4
by: Arun | last post by:
I came across a message sometime back in 2002. Here's a link:...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.