Actually, there is another way,
it's quite simple,
I can't get the div's id but I can write inside the div, I don't need to change the current div, I can create whatever I want inside.
So now, I have a javacript function in the header that is called in every div reciving parameters that will...
I didn't know it was possible to send parameters to a javascript file with "?var=value".
my script can't recieve any paramenters, it has to find his parent.
I'm using a web development tool called outsystems, and don't have a good control over the elemens.
the reason that the script cant...
yes, the javascript file (JsSource.js) is the same for all divs,
I know it could be better if I put the code in the header and call a function but, this is how I need the code.
do you have any ideia how to get the div were the script is called?
i'll have lots of divs
...
<div id="firstDiv">
<script src="JsSource.js" type="text/javascript"></script>
</div>
<div id="secondDiv">
<script src="JsSource.js" type="text/javascript"></script>
</div>
...
the JsSource.js file will have a script that will change the current div, i will not know...
hi,
i'm trying to create a scrit that gets one html element but, i don't know the id.
i have something like:
...
<div id="firstDiv">
<script src="JsSource.js" type="text/javascript"></script>
</div>
<div id="firstDiv">
<script src="JsSource.js" type="text/javascript"></script>
</div>
...
--...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.