Technical Details
Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : Yourself
Forum link : ( link is hidden, you must reply to see )
Description of problem
Hello!I would like to add either a separate row, or an image, or a DIV in the registration table. Basically - a title before specific profile settings.
After user has agreed to terms and conditions, a window with mandatory user details is displayed. I want to insert custom content here. The main issue - there are no ID's on TR elements. I have tried something like this:
- Code:
//Code by KamiSama
$(document).ready(function(){
if(document.URL.indexOf("http://URL/register?agreed=true&step=2") >= 0){
$('#profile_field_7_7').css({"background-image": "url('https://i.solidfiles.com/BzmjXA3DzmWgV.png')", "height" : "60px", "width" : "260px"});
var insert = '<tr><td class="gen row1" align="left"><span><span style="color:#292929;">Kraujas</span> * : </span></td><td class="gensmall row2"><select class="gensmall" id="profile_field_7_7" name="profile_field_7_7" size="1" style="background-image: url(https://i.solidfiles.com/BzmjXA3DzmWgV.png); height: 60px; width: 260px;"><option value="">No choice</option><option value="0">Grynakraujė</option><option value="1">Grynakraujis</option><option value="2">Purvakraujė</option><option value="3">Purvakraujis</option><option value="4">Maišyta</option><option value="5">Maišytas</option><option value="6">Nevertėlė</option><option value="7">Nevertėlis</option><option value="8" selected="selected">Žiobaras</option></select><br><span class="gensmall">Kokia tavo personažo kilmė?</span></td></tr>';
var new_row = insert.parentNode.insertRow( insert.rowIndex + 1 );
new_row.insertCell(0).innerHTML = "test";
new_row.insertCell(1).innerHTML = "test2";
}
});
Background replacement works perfectly, yet adding a new row is a bit more difficult. Any ideas?
Last edited by Kami-sama on June 9th 2017, 9:33 pm; edited 1 time in total