BullGuard Antivirus Sale - 60% Off with openElement !
Forum Home Forum Home >

openElement

> openElement General Discussion
  New Posts New Posts RSS Feed - Change html attributes of elements in code?
  FAQ FAQ  Forum Search   Register Register  Login Login

Change html attributes of elements in code?

 Post Reply Post Reply
Author
Message
alnes View Drop Down
Newbie
Newbie


Joined: May 27 2021
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote alnes Quote  Post ReplyReply Direct Link To This Post Topic: Change html attributes of elements in code?
    Posted: May 29 2021 at 1:19pm
Hello,

Is it possible to insert an HTML attribute from any element (e.g. Group of Elements) ?

I need this for my Java Framework.



I need to add something like "wicket:id="container01" in the div tag.

thanks
alnes
Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: May 29 2021 at 2:12pm
You can add any of the standard attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes  using javascript functions.

$("WEe75a507as05").attr("width","200px");




Back to Top
alnes View Drop Down
Newbie
Newbie


Joined: May 27 2021
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote alnes Quote  Post ReplyReply Direct Link To This Post Posted: May 29 2021 at 2:17pm
Hm but i cant select an element and edit his div tag with own attributes ?


Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: May 29 2021 at 2:23pm
If you edit an element out of openelement (with a text editor) it will ve overwritten by openelement.

What are you trying to di precisely?


Back to Top
alnes View Drop Down
Newbie
Newbie


Joined: May 27 2021
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote alnes Quote  Post ReplyReply Direct Link To This Post Posted: May 29 2021 at 6:00pm
I use a Java Framework Apache Wicket. And i need to modify html tags for this:

<button class="btn">Neue Kategorie anlegen</button>

->

<button wicket:id="newCategory" class="btn">Neue Kategorie anlegen</button>
Back to Top
Hobby001 View Drop Down
Admin Group
Admin Group
Avatar

Joined: Jun 05 2018
Location: Canada, Québec
Status: Offline
Points: 6195
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hobby001 Quote  Post ReplyReply Direct Link To This Post Posted: May 29 2021 at 7:28pm
I don't know if it will fullfill your needs but the following function seems to be working

$(function(){$('#WE6eb52d9839').attr("wicket:id","newCategory");});

I added it on a test page

<div id="XBody" class="BaseDiv RWidth OEPageXbody OESK_XBody_Default" style="z-index:0">
<div class="OESZ OESZ_DivContent OESZG_XBody">
<div class="OESZ OESZ_XBodyContent OESZG_XBody OECT OECT_Content OECTAbs">
<div id="WE6eb52d9839" class="BaseDiv RKeepRatio OEWEImage OESK_WEImage_Default" style="z-index:1" wicket:id="newCategory">
<div class="OESZ OESZ_DivContent OESZG_WE6eb52d9839">
<img src="WEFiles/Image/WEImage/Bunny-WE6eb52d9839.jpg" class="OESZ OESZ_Img OESZG_WE6eb52d9839" alt="">
</div>
</div>
</div>
<div class="OESZ OESZ_XBodyFooter OESZG_XBody OECT OECT_Footer OECTAbs"></div>
</div>
</div>


Edited by Hobby001 - May 29 2021 at 7:29pm
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.