Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 609 Bytes

updateImageOnSelectList.md

File metadata and controls

26 lines (22 loc) · 609 Bytes

How to Update a Image Item on Select List Change without Page Refresh

In this tutorial we will show how to dynamically change a image src on select list change without refreshing the page.

CREATE table "PLAYERS" (
    "ID"         NUMBER,
    "PLAYERNAME" VARCHAR2(200),
    "CARD_URL"   VARCHAR2(600),
    constraint  "PLAYERS_PK" primary key ("ID")
)
/

CREATE sequence "PLAYERS_SEQ"
/

CREATE trigger "BI_PLAYERS"  
  before insert on "PLAYERS"              
  for each row
begin  
  if :NEW."ID" is null then
    select "PLAYERS_SEQ".nextval into :NEW."ID" from sys.dual;
  end if;
end;
/